mirror of https://github.com/kubernetes/kops.git
Mount /etc/hosts from host for CoreDNS
This commit is contained in:
parent
51f2fd613c
commit
29e87b6c15
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue