Add k8s upgrade
This commit is contained in:
parent
03f0ad847e
commit
cd859cc9c4
2 changed files with 64 additions and 0 deletions
|
@ -32,6 +32,7 @@
|
|||
- [Ops](./ops/main.md)
|
||||
- [k8s](./ops/k8s/main.md)
|
||||
- [kubectl](./ops/k8s/kubectl.md)
|
||||
- [upgrade](./ops/k8s/upgrade.md)
|
||||
- [macOS](./ops/macos/main.md)
|
||||
- [iterm](./ops/macos/iterm.md)
|
||||
- [GNU/Linux](./ops/gnulinux/main.md)
|
||||
|
|
63
src/ops/k8s/upgrade.md
Normal file
63
src/ops/k8s/upgrade.md
Normal file
|
@ -0,0 +1,63 @@
|
|||
# Cluster Upgrade
|
||||
|
||||
## Versions
|
||||
|
||||
`vMajor.Minor.Patch` semantic versioning
|
||||
|
||||
K8S compatibility is as follow : current and n-2 version are supported.
|
||||
|
||||
**Always upgrade minor to minor releases**.
|
||||
|
||||
## kubeadm
|
||||
|
||||
### Check latest/upgradable version
|
||||
|
||||
```shell
|
||||
kubeadm upgrade plan
|
||||
```
|
||||
|
||||
## Master node upgrade
|
||||
|
||||
### Drain and mark it at Unschedulable
|
||||
|
||||
```shell
|
||||
kubectl drain master
|
||||
```
|
||||
|
||||
`kubectl get nodes` to verify that master node is unschedulable
|
||||
|
||||
### kubeadm update
|
||||
|
||||
```shell
|
||||
apt install kubeadm=X.Y.Z-00
|
||||
```
|
||||
|
||||
`kubeadm version` to ensure version number
|
||||
|
||||
### Node update
|
||||
|
||||
```shell
|
||||
kubeadm upgrade apply vX.Y.Z
|
||||
```
|
||||
|
||||
`kubectl version` to validate
|
||||
|
||||
### Update kubelet
|
||||
|
||||
```shell
|
||||
apt install kubelet=X.Y.Z-00
|
||||
```
|
||||
|
||||
`kubectl get nodes` to validate
|
||||
|
||||
### Mark master node as schedulable
|
||||
|
||||
```shell
|
||||
kubectl uncordon master
|
||||
```
|
||||
|
||||
## Worker nodes upgrade
|
||||
|
||||
Repeat the same actions done on master for each worker node
|
||||
|
||||
🎉
|
Loading…
Add table
Reference in a new issue