containerd issue

This commit is contained in:
Bartal Læarsson
2025-02-28 12:24:44 +00:00
parent 24d9859b2d
commit 2d7a7f4baf
3 changed files with 18 additions and 9 deletions
+4 -4
View File
@@ -6,15 +6,15 @@ all:
control_plane: control_plane:
hosts: hosts:
controlplane: controlplane:
ansible_host: 10.203.146.40 ansible_host: 10.203.146.166
workers: workers:
hosts: hosts:
node01: node01:
ansible_host: 10.203.146.133 ansible_host: 10.203.146.180
node02: node02:
ansible_host: 10.203.146.11 ansible_host: 10.203.146.62
node03: node03:
ansible_host: 10.203.146.223 ansible_host: 10.203.146.185
vars: vars:
ansible_user: ubuntu ansible_user: ubuntu
ansible_become: yes ansible_become: yes
@@ -76,11 +76,11 @@
register: node_ready register: node_ready
changed_when: false changed_when: false
- name: Remove taint from control plane node # - name: Remove taint from control plane node
shell: kubectl --kubeconfig=/etc/kubernetes/admin.conf taint nodes --all node-role.kubernetes.io/control-plane- # shell: kubectl --kubeconfig=/etc/kubernetes/admin.conf taint nodes --all node-role.kubernetes.io/control-plane-
register: taint_result # register: taint_result
changed_when: "'untainted' in taint_result.stdout" # changed_when: "'untainted' in taint_result.stdout"
failed_when: false # This might fail if the taint doesn't exist, which is fine # failed_when: false # This might fail if the taint doesn't exist, which is fine
- name: Remove load balancer label from all nodes - name: Remove load balancer label from all nodes
shell: kubectl --kubeconfig=/etc/kubernetes/admin.conf label nodes --all node.kubernetes.io/exclude-from-external-load-balancers- shell: kubectl --kubeconfig=/etc/kubernetes/admin.conf label nodes --all node.kubernetes.io/exclude-from-external-load-balancers-
@@ -64,6 +64,15 @@
when: config_written.changed when: config_written.changed
notify: Restart containerd notify: Restart containerd
- name: Update containerd config for Kubernetes sandbox image
lineinfile:
path: "{{ containerd_config_root }}/config.toml"
regexp: '(\s*)sandbox_image = ".*"'
line: '\1sandbox_image = "registry.k8s.io/pause:3.10"'
backrefs: yes
when: config_written.changed
notify: Restart containerd
- name: Update containerd config for GRPC socket group (gid) - name: Update containerd config for GRPC socket group (gid)
replace: replace:
path: "{{ containerd_config_root }}/config.toml" path: "{{ containerd_config_root }}/config.toml"