Use DNS_SERVER_IP as --cluster-dns in all cases.

NodeLocalDNS addon listens on both DNS_SERVER_IP as well as LOCAL_DNS_IP. So cluster-dns flag can continue to be DNS_SERVER_IP in all cases.
Documented the various variables in the yaml.
This commit is contained in:
prameshj 2019-10-22 23:51:04 -07:00 committed by Pavithra Ramesh
parent 2adadf9218
commit 328f8dfe12
2 changed files with 11 additions and 3 deletions

View File

@ -14,6 +14,17 @@ The variables will be substituted by the configure scripts when the yaml is copi
To create a GCE cluster with nodelocaldns enabled, use the command: To create a GCE cluster with nodelocaldns enabled, use the command:
`KUBE_ENABLE_NODELOCAL_DNS=true go run hack/e2e.go -v --up` `KUBE_ENABLE_NODELOCAL_DNS=true go run hack/e2e.go -v --up`
We have the following variables in the yaml:
`__PILLAR__DNS__SERVER__` - set to kube-dns service IP.
`__PILLAR__LOCAL__DNS__` - set to the link-local IP(169.254.20.10 by default).
`__PILLAR__DNS__DOMAIN__` - set to the cluster domain(cluster.local by default).
The following variables will be set by the node-cache images - k8s.gcr.io/k8s-dns-node-cache:1.15.6 or later.
The values will be determined by reading the kube-dns configMap for custom
Upstream server configuration.
`__PILLAR__CLUSTER__DNS__` - Upstream server for in-cluster queries.
`__PILLAR__UPSTREAM__SERVERS__` - Upstream servers for external queries.
### Network policy and DNS connectivity ### Network policy and DNS connectivity
When running nodelocaldns addon on clusters using network policy, additional rules might be required to enable dns connectivity. When running nodelocaldns addon on clusters using network policy, additional rules might be required to enable dns connectivity.

View File

@ -950,9 +950,6 @@ function print-common-kubelet-config {
declare quoted_dns_server_ip declare quoted_dns_server_ip
declare quoted_dns_domain declare quoted_dns_domain
quoted_dns_server_ip=$(yaml-quote "${DNS_SERVER_IP}") quoted_dns_server_ip=$(yaml-quote "${DNS_SERVER_IP}")
if [[ "${ENABLE_NODELOCAL_DNS:-}" == "true" ]]; then
quoted_dns_server_ip=$(yaml-quote "${LOCAL_DNS_IP}")
fi
quoted_dns_domain=$(yaml-quote "${DNS_DOMAIN}") quoted_dns_domain=$(yaml-quote "${DNS_DOMAIN}")
cat <<EOF cat <<EOF
kind: KubeletConfiguration kind: KubeletConfiguration