diff --git a/roles/kubernetes-apps/ansible/defaults/main.yml b/roles/kubernetes-apps/ansible/defaults/main.yml index cb2317b1e0579ee9c50fa788e514a554bbeb149c..726e7fc21bf6f9c3f51510f7569c24ea6f52cb03 100644 --- a/roles/kubernetes-apps/ansible/defaults/main.yml +++ b/roles/kubernetes-apps/ansible/defaults/main.yml @@ -16,8 +16,6 @@ coredns_ordinal_suffix: "" coredns_deployment_nodeselector: "kubernetes.io/os: linux" coredns_default_zone_cache_block: | cache 30 -coredns_host_network: false -coredns_port: 53 coredns_pod_disruption_budget: false # value for coredns pdb diff --git a/roles/kubernetes-apps/ansible/templates/coredns-config.yml.j2 b/roles/kubernetes-apps/ansible/templates/coredns-config.yml.j2 index 587a4e65d2ab99c526af29f685dd05c0f8d6ee77..8a4811937772857561bd4c60755e647e8cd6f81f 100644 --- a/roles/kubernetes-apps/ansible/templates/coredns-config.yml.j2 +++ b/roles/kubernetes-apps/ansible/templates/coredns-config.yml.j2 @@ -34,7 +34,7 @@ data: } {% endfor %} {% endif %} - .:{{ coredns_port }} { + .:53 { {% if coredns_additional_configs is defined %} {{ coredns_additional_configs | indent(width=8, first=False) }} {% endif %} diff --git a/roles/kubernetes-apps/ansible/templates/coredns-deployment.yml.j2 b/roles/kubernetes-apps/ansible/templates/coredns-deployment.yml.j2 index cbdca57275961c00e89b1c7cebe9665821290a28..e929dba6286981e25abff2b100f503a111398c1b 100644 --- a/roles/kubernetes-apps/ansible/templates/coredns-deployment.yml.j2 +++ b/roles/kubernetes-apps/ansible/templates/coredns-deployment.yml.j2 @@ -24,7 +24,6 @@ spec: annotations: createdby: 'kubespray' spec: - hostNetwork: {{ coredns_host_network | default(false) }} securityContext: seccompProfile: type: RuntimeDefault @@ -76,10 +75,10 @@ spec: - name: config-volume mountPath: /etc/coredns ports: - - containerPort: {{ coredns_port }} + - containerPort: 53 name: dns protocol: UDP - - containerPort: {{ coredns_port }} + - containerPort: 53 name: dns-tcp protocol: TCP - containerPort: 9153 diff --git a/roles/kubernetes-apps/ansible/templates/coredns-svc.yml.j2 b/roles/kubernetes-apps/ansible/templates/coredns-svc.yml.j2 index 961e02a6aada995a76adc01eee833253f89a6e07..0e051c34678dcf36c3eaee36dd816d2a41ab77d1 100644 --- a/roles/kubernetes-apps/ansible/templates/coredns-svc.yml.j2 +++ b/roles/kubernetes-apps/ansible/templates/coredns-svc.yml.j2 @@ -20,11 +20,9 @@ spec: - name: dns port: 53 protocol: UDP - targetPort: "dns" - name: dns-tcp port: 53 protocol: TCP - targetPort: "dns-tcp" - name: metrics port: 9153 protocol: TCP