summaryrefslogtreecommitdiff
path: root/roles/kubernetes
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-01-03 18:28:34 +0100
committerChristian Pointner <equinox@spreadspace.org>2021-01-03 18:28:34 +0100
commit66c1278f98502e05f0683472d444441fd504bfbe (patch)
tree5bb57c2cd47109defef14924a07d2e32e80e0671 /roles/kubernetes
parentkubernetes: upgrade metrics-server addon (diff)
kubernetes: update node-local-dns
Diffstat (limited to 'roles/kubernetes')
-rw-r--r--roles/kubernetes/kubeadm/master/templates/node-local-dns.yml.j223
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