File tree Expand file tree Collapse file tree
roles/kubernetes/kubeadm/tasks Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6969 - not kubelet_conf.stat.exists
7070 - kubeadm_use_file_discovery
7171
72+ - name : nginx proxy | start with containerd
73+ command : >-
74+ ctr --namespace=k8s.io run
75+ --net-host
76+ --snapshotter=zfs
77+ -d
78+ --mount type=bind,src={{ nginx_config_dir }},dst=/etc/nginx,options=rbind:ro
79+ {{ nginx_image_repo }}:{{ nginx_image_tag }}
80+ nginx
81+ when :
82+ - not kubelet_conf.stat.exists
83+ - container_manager == 'containerd'
84+
7285- name : Create kubeadm client config
7386 template :
7487 src : " kubeadm-client.conf.j2"
203216 - inventory_hostname not in groups['kube_control_plane']
204217 - kube_network_plugin in ["calico", "flannel", "cilium"] or cilium_deploy_additionally
205218 - kube_network_plugin != "calico" or calico_datastore == "etcd"
219+
220+ # Cleanup the nginx proxy that we created earlier on to bootstrap kubelet, so that it can start
221+ - name : nginx proxy | stop container
222+ command : ctr --namespace=k8s.io task delete -f nginx
223+ when :
224+ - not kubelet_conf.stat.exists
225+ - container_manager == 'containerd'
226+ ignore_errors : yes
227+
228+ - name : nginx proxy | delete container
229+ command : ctr --namespace=k8s.io container rm nginx
230+ when :
231+ - not kubelet_conf.stat.exists
232+ - container_manager == 'containerd'
233+ ignore_errors : yes
You can’t perform that action at this time.
0 commit comments