You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
在这个例子中,用户有一个 Consul DNS 服务发现系统,他们希望能够与 kube-dns 集成起来。 Consul 域名服务器地址为 10.150.0.1,所有的 Consul 名字具有后缀 “.consul.local”。 要配置 Kubernetes,集群管理员只需要简单地创建一个 ConfigMap 对象,如下所示:
149
+
在这个例子中,用户有一个 Consul DNS 服务发现系统,他们希望能够与 kube-dns 集成起来。 Consul 域名服务器地址为 10.150.0.1,所有的 Consul 名字具有后缀 `.consul.local`。 要配置 Kubernetes,集群管理员只需要简单地创建一个 ConfigMap 对象,如下所示:
150
150
151
151
```yaml
152
152
apiVersion: v1
@@ -201,14 +201,13 @@ spec:
201
201
202
202
使用该文件创建 Pod 并验证其状态:
203
203
204
-
```bash
205
204
$ kubectl create -f busybox.yaml
206
205
pod "busybox" created
207
206
208
207
$ kubectl get pods busybox
209
208
NAME READY STATUS RESTARTS AGE
210
209
busybox 1/1 Running 0 <some-time>
211
-
```
210
+
```
212
211
213
212
该 Pod 运行后,您可以在它的环境中执行 `nslookup`。如果您看到类似如下的输出,表示 DNS 正在正确工作。
Kubernetes集群中读取区(zone)数据。它实现了为Kubernetes的DNS服务发现定义的规范:[Kubernetes DNS-Based Service Discovery](https://github.com/kubernetes/dns/blob/master/docs/specification.md)。
0 commit comments