Upgrade Cluster and Node Pool Using Script
You can use the upgrade_cluster.py
script to upgrade
the Kubernetes version of the cluster and the node pools in your Oracle WebLogic Server for
OKE stack.
The script upgrades the cluster and the node pool to the specified target version.
After you upgrade the cluster to 1.24, it is recommended to upgrade the
kubectl
version to 1.23.
Prerequisites:
- Access the administration instance. See Access the Administration Instance.
- Install OCI Python SDK on the administration instance.
Note:
To install OCI Python SDK, a NAT gateway must be configured for the administration instance private subnet.sudo bash python3 -m pip install oci==2.90
If the
pip
command fails, then use theyum
command to install OCI Python SDK.yum install python36-oci-sdk
- In the OCI Console, delete the nodes for each node pool in the
cluster.
- Access the Oracle Cloud Infrastructure Console.
- From the navigation menu, select Developer Services. Under Containers & Artifacts, click Kubernetes Cluster (OKE).
- From the Compartment dropdown, select the compartment where your cluster is located.
- From the list of clusters, click the name of the cluster you want to modify.
- Under Resources, click Node Pools.
- From the list of node pools, click the name of the node pool.
- Under Resources, click Nodes.
- Make a note of the node count for the node pool.
You have to create the same number of nodes that you have noted, after upgrading the cluster and node pool.
- Click the arrow on the right, and under Actions, click Delete Node. In the Confirm page, click Delete.
See Delete a worker node in the Oracle Cloud Infrastructure documentation.
Upgrade the cluster and node pool using the script
You can use the script to upgrade the cluster, the node pool, or both cluster and node pool.