diff --git a/environments/dev/group_vars/k8s-cluster.yml b/environments/dev/group_vars/k8s-cluster.yml index 38a0a5355..609e86807 100644 --- a/environments/dev/group_vars/k8s-cluster.yml +++ b/environments/dev/group_vars/k8s-cluster.yml @@ -44,9 +44,9 @@ upstream_dns_servers: - 8.8.8.8 - 4.4.8.8 -# Turn this varable to 'false' to disable whole DNS configuration. +# Use dns server : https://github.com/ansibl8s/k8s-skydns/blob/master/skydns-README.md dns_setup: true dns_domain: "{{ cluster_name }}" # Ip address of the kubernetes dns service -kube_dns_server: 10.233.0.10 +dns_server: 10.233.0.10 diff --git a/environments/production/group_vars/k8s-cluster.yml b/environments/production/group_vars/k8s-cluster.yml index 4135cf1c9..4231c4c19 100644 --- a/environments/production/group_vars/k8s-cluster.yml +++ b/environments/production/group_vars/k8s-cluster.yml @@ -43,10 +43,10 @@ # upstream_dns_servers: # - 8.8.8.8 # - 4.4.8.8 - -# Turn this varable to 'false' to disable whole DNS configuration. +# +# # Use dns server : https://github.com/ansibl8s/k8s-skydns/blob/master/skydns-README.md # dns_setup: true # dns_domain: "{{ cluster_name }}" - -# Ip address of the kubernetes dns service -# kube_dns_server: 10.233.0.10 +# +# # Ip address of the kubernetes dns service +# dns_server: 10.233.0.10 diff --git a/roles/apps/k8s-skydns b/roles/apps/k8s-skydns index 19dd13c6d..b00d0ce5c 160000 --- a/roles/apps/k8s-skydns +++ b/roles/apps/k8s-skydns @@ -1 +1 @@ -Subproject commit 19dd13c6da2f54bd44dd865eec8782b7a781907a +Subproject commit b00d0ce5c952a9c0364f48babf95ad6357e82ccd diff --git a/roles/dnsmasq/templates/01-kube-dns.conf.j2 b/roles/dnsmasq/templates/01-kube-dns.conf.j2 index 370c43c99..e9e8d62e0 100644 --- a/roles/dnsmasq/templates/01-kube-dns.conf.j2 +++ b/roles/dnsmasq/templates/01-kube-dns.conf.j2 @@ -16,4 +16,4 @@ server={{ srv }} {% endif %} # Forward k8s domain to kube-dns -server=/{{ dns_domain }}/{{ kube_dns_server }} +server=/{{ dns_domain }}/{{ dns_server }} diff --git a/roles/kubernetes/node/templates/kubelet.j2 b/roles/kubernetes/node/templates/kubelet.j2 index 418f6a3c4..d464008fc 100644 --- a/roles/kubernetes/node/templates/kubelet.j2 +++ b/roles/kubernetes/node/templates/kubelet.j2 @@ -12,7 +12,7 @@ Environment="KUBELET_HOSTNAME=--hostname_override={{ inventory_hostname }}" # location of the api-server Environment="KUBELET_API_SERVER=--api_servers=https://{{ groups['kube-master'][0]}}:{{ kube_master_port }}" {% if dns_setup %} -Environment="KUBELET_ARGS=--cluster_dns={{ kube_dns_server }} --cluster_domain={{ dns_domain }} --kubeconfig={{ kube_config_dir}}/kubelet.kubeconfig --config={{ kube_manifest_dir }}" +Environment="KUBELET_ARGS=--cluster_dns={{ dns_server }} --cluster_domain={{ dns_domain }} --kubeconfig={{ kube_config_dir}}/kubelet.kubeconfig --config={{ kube_manifest_dir }}" {% else %} Environment="KUBELET_ARGS=--kubeconfig={{ kube_config_dir}}/kubelet.kubeconfig --config={{ kube_manifest_dir }}" {% endif %}