Your Oracle Container Cluster is not automatically upgraded to new versions as the come out. Automatically upgrading your cluster could cause problems if you’re running an application that would fail on a newer version.
However, the process to upgrade your Oracle Container Cluster is fairly straight forward.
Before you upgrade your Container Cluster, make sure all of your deployed apps will work with the version you intend to upgrade to.
Open the Cluster details page
From your Oracle Cloud Dashboard
- Click the menu icon in the upper left.
- Find “Developer Services”.
- Click Container Services (OKE).
- Select the cluster you want to upgrade.
If there’s an upgrade available you’ll find a button next to the delete button on the details page. Unfortunately, I had upgraded my cluster before I took a screenshot. But, I used my amazing image editing skills to add a button to the picture below.
Push the upgrade button and you will see a list of the versions that are available. You can upgrade 1 version at a time until you get to the current version. If you’re upgrading across multiple versions, I recommend testing your deployed apps after each upgrade.
Worker nodes will not automatically upgrade with the master node. If you have worker nodes that are more that 2 versions behind the master you will receive an error when you attempt to upgrade the cluster beyond that point.
I’m sure you could upgrade the worker nodes in your node pools manually, but I decided to take the easy route and…
Migrate to New Worker Nodes
- In your cluster details page, under resources, click “Node Pools”.
- Open your node pool details page.
- Under resources click nodes.
- For each node, collect the private IP and any custom settings, save them for later. You could also keep this page open in a separate window.
- Go back to your cluster details page, and click the “Add Node Pool” button.
- Create a new pool using the same settings for the current pool and its nodes.
- Wait until all Nodes are “Ready”.
- In a terminal use kubectrl to drain the existing pool.
1kubectl drain 10.0.10.4 10.0.12.4 10.0.11.5
If you’ve manually assigned your pods to a specific node, you will need to move the pod manually. (Not covered here.)
- Open the Kubernetes API, make sure all of the pods are running on the new pool’s nodes.
- Go back to the Oracle Container Cluster details page, under resources, Open the drained node pool.
- Click “Delete Node Pool”.
- If you have multiple Node Pools, repeat these steps for each pool.
If your cluster was more than 2 versions behind you may have to repeat this process until you’re on the current version.