diff options
Diffstat (limited to 'roles/kubernetes/kubeadm/master/templates/node-local-dns.yml.j2')
-rw-r--r-- | roles/kubernetes/kubeadm/master/templates/node-local-dns.yml.j2 | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/roles/kubernetes/kubeadm/master/templates/node-local-dns.yml.j2 b/roles/kubernetes/kubeadm/master/templates/node-local-dns.yml.j2 index 210c551a..d536d5a7 100644 --- a/roles/kubernetes/kubeadm/master/templates/node-local-dns.yml.j2 +++ b/roles/kubernetes/kubeadm/master/templates/node-local-dns.yml.j2 @@ -140,7 +140,7 @@ spec: operator: "Exists" containers: - name: node-cache - image: k8s.gcr.io/k8s-dns-node-cache:1.15.13 + image: k8s.gcr.io/dns/k8s-dns-node-cache:1.16.0 resources: requests: cpu: 25m @@ -188,3 +188,24 @@ spec: items: - key: Corefile path: Corefile.base +--- +# A headless service is a service with a service IP but instead of load-balancing it will return the IPs of our associated Pods. +# We use this to expose metrics to Prometheus. +apiVersion: v1 +kind: Service +metadata: + annotations: + prometheus.io/port: "9253" + prometheus.io/scrape: "true" + labels: + k8s-app: node-local-dns + name: node-local-dns + namespace: kube-system +spec: + clusterIP: None + ports: + - name: metrics + port: 9253 + targetPort: 9253 + selector: + k8s-app: node-local-dns |