Skip to content

Commit 7836de7

Browse files
committed
Allow certificate rotation during cluster upgrade
1 parent 2dec8eb commit 7836de7

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

kubetest2-tf/data/k8s-ansible/docs/update-os.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,22 @@ as these are generally long-running in nature.
2121
#### Steps to follow:
2222
1. 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]
2928
10.20.177.51
3029
10.20.177.26
3130
10.20.177.227
3231
[workers]
3332
10.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
```
4141
2. Set the path to the `kubeconfig` of the cluster under group_vars/all - under the `kubeconfig_path` variable.
4242
3. Once the above are set use the following command to update the nodes -

kubetest2-tf/data/k8s-ansible/roles/update-k8s-patch/tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
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

0 commit comments

Comments
 (0)