File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
kubetest2-tf/data/k8s-ansible
roles/update-k8s-patch/tasks Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -21,22 +21,22 @@ as these are generally long-running in nature.
2121#### Steps to follow:
22221 . From the k8s-ansible directory, generate the hosts.yml file on which the OS updates are to be performed.
2323 In this case, one can use the hosts.yml file under ` examples/containerd-cluster/hosts.yml ` to contain the IP(s)
24- of the following nodes - Bastion, Workers and Masters.
24+ of the following nodes - Bastion, Workers and Masters.
25+ In case if a bastion is involved in the setup, it is necessary to have a [ bastion] section and the associated IP in the ` hosts.yml ` file
2526```
26- [bastion]
27- 1.2.3.4
2827[masters]
292810.20.177.51
302910.20.177.26
313010.20.177.227
3231[workers]
333210.20.177.39
3433
35- [workers:vars]
36- ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -i <path-to-private-key> -q root@X" -i <path-to-private-key>'
37-
38- [masters:vars]
39- ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -i <path-to-private-key> -q root@X" -i <path-to-private-key>'
34+ ## The following section is needed if a bastion is involved.
35+ ##[workers:vars]
36+ ##ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -i <path-to-private-key> -q root@X" -i <path-to-private-key>'
37+ ##
38+ ##[masters:vars]
39+ ##ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -i <path-to-private-key> -q root@X" -i <path-to-private-key>'
4040```
41412 . Set the path to the ` kubeconfig ` of the cluster under group_vars/all - under the ` kubeconfig_path ` variable.
42423 . Once the above are set use the following command to update the nodes -
Original file line number Diff line number Diff line change 1010 when : node_type == "master"
1111
1212- name : Perform kubeadm upgrade on the first control-plane node
13- shell : kubeadm upgrade apply v{{ kubernetes_major_minor }}.{{ kubernetes_patch }} --certificate-renewal=false -y
13+ shell : kubeadm upgrade apply v{{ kubernetes_major_minor }}.{{ kubernetes_patch }}
1414 when : groups['masters']|length > 1 and inventory_hostname == groups['masters'][0]
1515
1616- name : Update the kubelet and the kubectl utilities
1717 shell : sudo yum install -y kubelet-'{{ kubernetes_major_minor }}.{{ kubernetes_patch }}-*' kubectl-'{{ kubernetes_major_minor }}.{{ kubernetes_patch }}-*' --disableexcludes=kubernetes
1818
1919- name : Perform kubeadm upgrade on the rest of the nodes
20- shell : kubeadm upgrade node --certificate-renewal=false
20+ shell : kubeadm upgrade node
2121 when : inventory_hostname != groups['masters'][0] and (node_type == "master" or node_type == "worker")
2222
2323- name : Reload the systemd processes
You can’t perform that action at this time.
0 commit comments