安装DNS服务CoreDNS
下载安装包
wget -c https://github.com/kubernetes/kubernetes/releases/download/v1.10.4/kubernetes.tar.gz
解压
tar -zxvf kubernetes.tar.gz
需要部署的文件存在于目录/kubernetes/cluster/addons/dns,
cp coredns.yaml.base coredns.yaml
diff coredns.yaml.base coredns.yaml
> 修改内容对比如下
###
61c61
< kubernetes __PILLAR__DNS__DOMAIN__ in-addr.arpa ip6.arpa {
---
> kubernetes cluster.local in-addr.arpa ip6.arpa {
153c153
< clusterIP: __PILLAR__DNS__SERVER__
---
> clusterIP: 169.169.0.100
创建coredns
kubectl create -f coredns.yaml
注意:
要设置所有kubelet的cluster-dns和cluster-domain参数
##
--cluster-dns=169.169.0.100 --cluster-domain=cluster.local
Comments | NOTHING