c12s-kubespray/roles/kubernetes-apps/ansible/tasks/nodelocaldns.yml
Thomas Nys 3e3ee0aeb1 Add support for running a nodelocal dns cache (#3861)
* Add support for running a nodelocal dns cache

After encountering dns issues in a cluster I was recently working on I
noticed Kubernetes 1.13 introduced support for running a nodelocal dns
cache.

I believe this can usefull for more people.

73b548db06
https://github.com/kubernetes/enhancements/blob/master/keps/sig-network/0030-nodelocal-dns-cache.md

* Add requested changes

* Add additional requested changes + documentation

* Add requested changes after review

* Replace incorrect variable
2018-12-10 17:28:03 -08:00

18 lines
653 B
YAML

---
- name: Kubernetes Apps | Lay Down nodelocaldns Template
template:
src: "{{ item.file }}.j2"
dest: "{{ kube_config_dir }}/{{ item.file }}"
with_items:
- { name: nodelocaldns, file: nodelocaldns-config.yml, type: configmap }
- { name: nodelocaldns, file: nodelocaldns-sa.yml, type: sa }
- { name: nodelocaldns, file: nodelocaldns-deamonset.yml, type: daemonset }
register: nodelocaldns_manifests
vars:
clusterIP: "{{ skydns_server }}"
secondaryclusterIP: "{{ skydns_server_secondary }}"
when:
- enable_nodelocaldns == True
- inventory_hostname == groups['kube-master'] | first
tags:
- nodelocaldns