summaryrefslogtreecommitdiff
path: root/roles/kubernetes/standalone/base/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/kubernetes/standalone/base/tasks/main.yml')
-rw-r--r--roles/kubernetes/standalone/base/tasks/main.yml34
1 files changed, 34 insertions, 0 deletions
diff --git a/roles/kubernetes/standalone/base/tasks/main.yml b/roles/kubernetes/standalone/base/tasks/main.yml
new file mode 100644
index 00000000..241c3136
--- /dev/null
+++ b/roles/kubernetes/standalone/base/tasks/main.yml
@@ -0,0 +1,34 @@
+---
+- name: create systemd override directory for kubelet
+ file:
+ path: /etc/systemd/system/kubelet.service.d
+ state: directory
+
+- name: install systemd override for kubelet
+ template:
+ src: kubelet.service.override.j2
+ dest: /etc/systemd/system/kubelet.service.d/standalone.conf
+ notify: restart kubelet
+
+- name: install kubelet config
+ template:
+ src: kubelet-config.yml.j2
+ dest: /etc/kubernetes/kubelet.yml
+ notify: restart kubelet
+
+- name: make sure kubelet is enabled and running
+ systemd:
+ name: kubelet.service
+ state: started
+ enabled: yes
+ daemon_reload: yes
+
+- name: create cni config directory
+ file:
+ name: /etc/cni/net.d
+ state: directory
+
+- name: install cni config
+ template:
+ src: "cni-{{ kubernetes_standalone_cni_variant }}.conflist.j2"
+ dest: /etc/cni/net.d/kube-standalone.conflist