https://github.com/thesurlydev/kubernetes-upgrade
A simple Bash script to automate upgrading a Kubernetes cluster
https://github.com/thesurlydev/kubernetes-upgrade
Last synced: about 1 year ago
JSON representation
A simple Bash script to automate upgrading a Kubernetes cluster
- Host: GitHub
- URL: https://github.com/thesurlydev/kubernetes-upgrade
- Owner: thesurlydev
- Created: 2020-09-24T18:15:31.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-06T17:39:15.000Z (over 4 years ago)
- Last Synced: 2025-02-06T18:52:28.504Z (over 1 year ago)
- Language: Shell
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# kubernetes-upgrade
The intent of this project is to automate an upgrade of a bare-metal Kubernetes cluster.
I use a single Bash script, `upgrade.sh`, to perform upgrades of my personal cluster and making it available for anyone else looking to automate upgrades.
## Requirements
1. `kubectl` installed on the host you call the `upgrade.sh` script from.
2. Passwordless ssh access to the control plane and worker nodes to upgrade.
Note that you should only upgrade one minor version at a time so if you're upgrading from an exceptionally older version
of Kubernetes to the latest version you may have to go through more than one iteration. The script doesn't handle this for you.
## Usage
1. Update the `TARGET_MAJOR_MINOR_VERSION` in the `upgrade.sh` script to something like `1.19`.
2. Update the values for `MASTER_NODE` and the `WORKER_NODES` array in the `upgrade.sh` script.
3. Execute the `upgrade.sh` script from a host that's *not* part of the cluster you're upgrading. You will be given the option to continue or skip certain sections of the upgrade as it progresses.
## References
* [Upgrading kubeadm clusters | Kubernetes](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/)