Skip to Content
Kubernetes即学即用(第二版)
book

Kubernetes即学即用(第二版)

by Brendan Burns, Joe Beda, Kelsey Hightower
June 2021
Intermediate to advanced
300 pages
5h 4m
Chinese
China Electric Power Press Ltd.
Content preview from Kubernetes即学即用(第二版)
48
3
3.6.2 Kubernetes DNS
Kubernetes
还运行了一个
DNS
服务器,其主要作用是为集群中定义的服务
提供命名和发现。这个
DNS
服务器在集群上也拥有多个副本。根据集群的
大小,你可能会看到一个或多个
DNS
服务器在集群中运行。
DNS
服务作为
Kubernetes
部署运行,负责管理以下副本:
$
kubectl get deployments --namespace=kube-system core-dns
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
core-dns 1 1 1 1 45d
此外,还有一个
Kubernetes
服务可以为
DNS
服务器提供负载均衡:
$
kubectl get services --namespace=kube-system core-dns
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
core-dns 10.96.0.10 <none> 53/UDP,53/TCP 45d
以上输出表明这个集群
DNS
服务的地址为
10.96.0.10
。如果登录到集群的容
器中,你就可以看到这个地址写到了容器的
/etc/resolv.conf
文件中。
Kubernetes 1.12
开始,
Kubernetes
DNS
服务由
kube-dns
改成了
core-
dns
。因此,如果你运行的旧版的 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PyTorch深度学习

PyTorch深度学习

Posts & Telecom Press, Vishnu Subramanian
Python数据分析

Python数据分析

Posts & Telecom Press, Ivan Idris
Python贝叶斯分析(第2版)

Python贝叶斯分析(第2版)

Posts & Telecom Press, Osvaldo Martin
Python高级编程(第2版)

Python高级编程(第2版)

Posts & Telecom Press, Michał Jaworski, Tarek Ziadé

Publisher Resources

ISBN: 9787519856762