This repository has been archived by the owner on Jun 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: How to upgrade bootstrap kubelet?
Signed-off-by: Suraj Deshmukh <suraj@kinvolk.io>
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# How to upgrade bootstrap kubelet | ||
|
||
## Introduction | ||
|
||
Bootstrap kubelet is the kubelet running on the node as a systemd service. Unlike most components on the cluster, lokoctl cannot update it. So there are some manual steps involved in updating the bootstrap kubelet. | ||
|
||
## Steps | ||
|
||
Apply the following steps to all the nodes one at a time. | ||
|
||
### Drain the node | ||
|
||
``` | ||
kubectl drain <node name> | ||
``` | ||
|
||
### Find out the IP | ||
|
||
Find the IP of the node by visiting the Cloud provider dashboard. | ||
|
||
``` | ||
ssh core@<IP Address> | ||
``` | ||
|
||
### On the node | ||
|
||
Run the following commands. **NOTE**: Export the correct and latest Kubernetes version, before proceeding to other commands. | ||
|
||
``` | ||
export latest_kube=<latest kubernetes version e.g. v1.18.0> | ||
sudo sed -i "s|$(grep -i kubelet_image_tag /etc/kubernetes/kubelet.env)|KUBELET_IMAGE_TAG=${latest_kube}|g" /etc/kubernetes/kubelet.env | ||
sudo systemctl restart kubelet | ||
sudo journalctl -fu kubelet | ||
``` | ||
|
||
Look at the logs carefully, if Kubelet fails to restart and instructs to do something like deleting a file, then delete it and restart the node. | ||
|
||
``` | ||
sudo reboot | ||
``` | ||
|
||
## Caveats | ||
|
||
- If a node which is running storage workload like Rook Ceph, then verify that the Ceph cluster is in **`HEALTH_OK`** state. If it is in **any other state, do not proceed with upgrades**. When the cluster is in `HEALTH_OK` state a few minutes of downtime of OSDs will not be a problem for Ceph cluster, that happens during node reboot. |