Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
docs: How to upgrade bootstrap kubelet?
Browse files Browse the repository at this point in the history
Signed-off-by: Suraj Deshmukh <suraj@kinvolk.io>
  • Loading branch information
surajssd committed Jun 10, 2020
1 parent 2271953 commit 1bf5758
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions docs/how-to-guides/upgrade-bootstrap-kubelet.md
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.

0 comments on commit 1bf5758

Please sign in to comment.