I use kubespray v2.16.0
. I am trying to add a master node by following the instructions https://github.com/kubernetes-sigs/kubespray/blob/v2.16.0/docs/nodes.md#addingreplacing-a-master-node .
In step 3 I need restart kube-system/nginx-proxy
, but I use containerd
. What should I do in this case?
Asked
Active
Viewed 531 times
0

Roman
- 11
- 1
-
1Hello @Roman, welcome to stack overflow! Did you see this page? https://github.com/projectatomic/containerd/blob/master/docs/cli.md#listing-containers If I understand correctly, you need to list all containers, then find `k8s_nginx-proxy_nginx-proxy` and restart it using `systemctl restart containerd` – Mikołaj Głodziak Jul 27 '21 at 13:11
1 Answers
1
I wrote a simple playbook for this, it helped me
- name: Stop nginx-proxy
shell: "{{ bin_dir }}/crictl ps | grep nginx-proxy | awk '{print $1}' | xargs {{ bin_dir }}/crictl stop"
- name: Check container state
shell: "{{ bin_dir }}/crictl ps --name nginx-proxy --state running | grep nginx-proxy"
changed_when: false
register: _containerd_state
until: _containerd_state is success
retries: 10
delay: 10

Roman
- 11
- 1