Merge pull request #84383 from prameshj/patch-3

Use DNS_SERVER_IP as --cluster-dns in all cases.
This commit is contained in:
Kubernetes Prow Robot
2019-10-29 15:38:52 -07:00
committed by GitHub
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