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 7474 - not kubelet_conf.stat.exists or not cluster_info_discovery_kubeconfig.stat.exists
7575 - kubeadm_use_file_discovery
7676
77+ - name : nginx proxy | start with containerd
78+ command : >-
79+ ctr --namespace=k8s.io run
80+ --net-host
81+ -d
82+ --mount type=bind,src={{ nginx_config_dir }},dst=/etc/nginx,options=rbind:ro
83+ {{ nginx_image_repo }}:{{ nginx_image_tag }}
84+ nginx
85+ when :
86+ - not kubelet_conf.stat.exists
87+ - container_manager == 'containerd'
88+
7789- name : Create kubeadm client config
7890 template :
7991 src : " kubeadm-client.conf.j2"
209221 - kube_network_plugin in ["calico", "flannel", "cilium"] or cilium_deploy_additionally
210222 - kube_network_plugin != "calico" or calico_datastore == "etcd"
211223 - kube_network_plugin != "cilium" or cilium_identity_allocation_mode != 'crd'
224+
225+ # Cleanup the nginx proxy that we created earlier on to bootstrap kubelet, so that it can start
226+ - name : nginx proxy | stop container
227+ command : ctr --namespace=k8s.io task delete -f nginx
228+ when :
229+ - not kubelet_conf.stat.exists
230+ - container_manager == 'containerd'
231+ ignore_errors : yes
232+
233+ - name : nginx proxy | delete container
234+ command : ctr --namespace=k8s.io container rm nginx
235+ when :
236+ - not kubelet_conf.stat.exists
237+ - container_manager == 'containerd'
238+ ignore_errors : yes
You can’t perform that action at this time.
0 commit comments