Skip to content

Commit

Permalink
using --cluster-domain for kube-dns domain (Azure#2303)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrancis authored Feb 20, 2018
1 parent 2e6d7cf commit e921a08
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ spec:
optional: true
containers:
- args:
- "--domain=cluster.local."
- "--domain=<kubernetesKubeletClusterDomain>."
- "--dns-port=10053"
- "--v=2"
- "--config-dir=/kube-dns-config"
Expand Down Expand Up @@ -138,9 +138,9 @@ spec:
- mountPath: /kube-dns-config
name: kube-dns-config
- args:
- "--cmd=nslookup kubernetes.default.svc.cluster.local 127.0.0.1 >/dev/null"
- "--cmd=nslookup kubernetes.default.svc.<kubernetesKubeletClusterDomain> 127.0.0.1 >/dev/null"
- "--url=/healthz-dnsmasq"
- "--cmd=nslookup kubernetes.default.svc.cluster.local 127.0.0.1:10053 >/dev/null"
- "--cmd=nslookup kubernetes.default.svc.<kubernetesKubeletClusterDomain> 127.0.0.1:10053 >/dev/null"
- "--url=/healthz-kubedns"
- "--port=8080"
- "--quiet"
Expand Down
3 changes: 1 addition & 2 deletions parts/k8s/kubernetesmastercustomdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,8 @@ MASTER_ARTIFACTS_CONFIG_PLACEHOLDER
sed -i "s|<kubernetesHyperkubeSpec>|{{WrapAsVariable "kubernetesHyperkubeSpec"}}|g" "/etc/kubernetes/manifests/kube-controller-manager.yaml"
sed -i "s|<kubernetesHyperkubeSpec>|{{WrapAsVariable "kubernetesHyperkubeSpec"}}|g" "/etc/kubernetes/manifests/kube-scheduler.yaml"
sed -i "s|<kubernetesHyperkubeSpec>|{{WrapAsVariable "kubernetesHyperkubeSpec"}}|g; s|<kubeClusterCidr>|{{WrapAsVariable "kubeClusterCidr"}}|g" "/etc/kubernetes/addons/kube-proxy-daemonset.yaml"
sed -i "s|<kubernetesKubeDNSSpec>|{{WrapAsVariable "kubernetesKubeDNSSpec"}}|g; s|<kubernetesDNSMasqSpec>|{{WrapAsVariable "kubernetesDNSMasqSpec"}}|g; s|<kubernetesExecHealthzSpec>|{{WrapAsVariable "kubernetesExecHealthzSpec"}}|g" "/etc/kubernetes/addons/kube-dns-deployment.yaml"
sed -i "s|<kubernetesKubeDNSSpec>|{{WrapAsVariable "kubernetesKubeDNSSpec"}}|g; s|<kubernetesDNSMasqSpec>|{{WrapAsVariable "kubernetesDNSMasqSpec"}}|g; s|<kubernetesExecHealthzSpec>|{{WrapAsVariable "kubernetesExecHealthzSpec"}}|g; s|<kubernetesKubeletClusterDomain>|{{WrapAsVariable "kubernetesKubeletClusterDomain"}}|g; s|<kubeDNSServiceIP>|{{WrapAsVariable "kubeDNSServiceIP"}}|g" "/etc/kubernetes/addons/kube-dns-deployment.yaml"
sed -i "s|<kubernetesHeapsterSpec>|{{WrapAsVariable "kubernetesHeapsterSpec"}}|g; s|<kubernetesAddonResizerSpec>|{{WrapAsVariable "kubernetesAddonResizerSpec"}}|g" "/etc/kubernetes/addons/kube-heapster-deployment.yaml"
sed -i "s|<kubeDNSServiceIP>|{{WrapAsVariable "kubeDNSServiceIP"}}|g" "/etc/kubernetes/addons/kube-dns-deployment.yaml"

{{if .OrchestratorProfile.KubernetesConfig.IsDashboardEnabled}}
sed -i "s|<kubernetesDashboardSpec>|{{WrapAsVariable "kubernetesDashboardSpec"}}|g" "/etc/kubernetes/addons/kubernetes-dashboard-deployment.yaml"
Expand Down
1 change: 1 addition & 0 deletions parts/k8s/kubernetesmastervars.t
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
"vnetCniLinuxPluginsURL":"[parameters('vnetCniLinuxPluginsURL')]",
"vnetCniWindowsPluginsURL":"[parameters('vnetCniWindowsPluginsURL')]",
"kubernetesNonMasqueradeCidr": "[parameters('kubernetesNonMasqueradeCidr')]",
"kubernetesKubeletClusterDomain": "[parameters('kubernetesKubeletClusterDomain')]",
"maxPods": "[parameters('maxPods')]",
"vnetCidr": "[parameters('vnetCidr')]",
"gcHighThreshold":"[parameters('gcHighThreshold')]",
Expand Down
6 changes: 6 additions & 0 deletions parts/k8s/kubernetesparams.t
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,12 @@
},
"type": "string"
},
"kubernetesKubeletClusterDomain": {
"metadata": {
"description": "--cluster-domain Kubelet config"
},
"type": "string"
},
"kubernetesHyperkubeSpec": {
{{PopulateClassicModeDefaultValue "kubernetesHyperkubeSpec"}}
"metadata": {
Expand Down
1 change: 1 addition & 0 deletions pkg/acsengine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,7 @@ func getParameters(cs *api.ContainerService, isClassicMode bool, generatorCode s
addValue(parametersMap, "cloudProviderRatelimitBucket", strconv.Itoa(properties.OrchestratorProfile.KubernetesConfig.CloudProviderRateLimitBucket))
addValue(parametersMap, "kubeClusterCidr", properties.OrchestratorProfile.KubernetesConfig.ClusterSubnet)
addValue(parametersMap, "kubernetesNonMasqueradeCidr", properties.OrchestratorProfile.KubernetesConfig.KubeletConfig["--non-masquerade-cidr"])
addValue(parametersMap, "kubernetesKubeletClusterDomain", properties.OrchestratorProfile.KubernetesConfig.KubeletConfig["--cluster-domain"])
addValue(parametersMap, "generatorCode", generatorCode)
if properties.HostedMasterProfile != nil {
addValue(parametersMap, "orchestratorName", "aks")
Expand Down

0 comments on commit e921a08

Please sign in to comment.