diff --git a/upup/models/cloudup/resources/addons/coredns.addons.k8s.io/k8s-1.12.yaml.template b/upup/models/cloudup/resources/addons/coredns.addons.k8s.io/k8s-1.12.yaml.template index 7024e73526..6e4eb38326 100644 --- a/upup/models/cloudup/resources/addons/coredns.addons.k8s.io/k8s-1.12.yaml.template +++ b/upup/models/cloudup/resources/addons/coredns.addons.k8s.io/k8s-1.12.yaml.template @@ -77,7 +77,7 @@ data: ttl 30 } {{- if GossipDomains }} - hosts /etc/coredns/hosts {{ join GossipDomains " " }} { + hosts /rootfs/etc/hosts {{ join GossipDomains " " }} { ttl 30 fallthrough } @@ -167,6 +167,11 @@ spec: - name: config-volume mountPath: /etc/coredns readOnly: true +{{- if GossipDomains }} + - name: etc-hosts + mountPath: /rootfs/etc/hosts + readOnly: true +{{- end }} ports: - containerPort: 53 name: dns @@ -204,6 +209,12 @@ spec: - name: config-volume configMap: name: coredns +{{- if GossipDomains }} + - name: etc-hosts + hostPath: + path: /etc/hosts + type: File +{{- end }} --- apiVersion: v1 kind: Service