From 66c1278f98502e05f0683472d444441fd504bfbe Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 3 Jan 2021 18:28:34 +0100 Subject: kubernetes: update node-local-dns --- .../kubeadm/master/templates/node-local-dns.yml.j2 | 23 +++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'roles/kubernetes') 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 -- cgit v1.2.3