diff --git a/content/zh-cn/docs/tasks/debug/debug-application/debug-service.md b/content/zh-cn/docs/tasks/debug/debug-application/debug-service.md index a6fe8453f34..f34671d25d3 100644 --- a/content/zh-cn/docs/tasks/debug/debug-application/debug-service.md +++ b/content/zh-cn/docs/tasks/debug/debug-application/debug-service.md @@ -76,7 +76,7 @@ can follow along and get a second data point. 或者你也可以跟着教程并开始下面的步骤来获得第二个数据点。 ```shell -kubectl create deployment hostnames --image=k8s.gcr.io/serve_hostname +kubectl create deployment hostnames --image=registry.k8s.io/serve_hostname ``` ```none @@ -100,7 +100,8 @@ deployment.apps/hostnames scaled ``` 请注意这与你使用以下 YAML 方式启动 Deployment 类似: @@ -123,7 +124,7 @@ spec: spec: containers: - name: hostnames - image: k8s.gcr.io/serve_hostname + image: registry.k8s.io/serve_hostname ``` "app" 标签是 `kubectl create deployment` 根据 Deployment 名称自动设置的。 -确认你的 Pods 是运行状态: +确认你的 Pod 是运行状态: ```shell kubectl get pods -l app=hostnames @@ -281,16 +282,18 @@ hostnames ClusterIP 10.0.1.175 80/TCP 5s 现在你知道了 Service 确实存在。 -同前,此步骤效果与通过 YAML 方式启动 `Service` 一样: +同前,此步骤效果与通过 YAML 方式启动 Service 一样: ```yaml apiVersion: v1 kind: Service metadata: + labels: + app: hostnames name: hostnames spec: selector: @@ -393,7 +396,7 @@ Namespace you're operating in. The "svc" denotes that this is a Service. The "cluster.local" is your cluster domain, which COULD be different in your own cluster. -You can also try this from a `Node` in the cluster: +You can also try this from a Node in the cluster: --> 注意这里的后缀:"default.svc.cluster.local"。"default" 是我们正在操作的命名空间。 @@ -444,7 +447,7 @@ options ndots:5 ``` `nameserver` 行必须指示你的集群的 DNS Service, @@ -550,7 +553,7 @@ are a number of things that could be going wrong. Read on. ## Is the Service defined correctly? It might sound silly, but you should really double and triple check that your -`Service` is correct and matches your `Pod`'s port. Read back your `Service` +Service is correct and matches your Pod's port. Read back your Service and verify it: --> ## Service 的配置是否正确? {#is-the-service-defined-correctly} @@ -598,6 +601,7 @@ kubectl get service hostnames -o json } } ``` + -访问[故障排查文档](/zh-cn/docs/tasks/debug/)获取更多信息。 +访问[故障排查概述文档](/zh-cn/docs/tasks/debug/)获取更多信息。