Updating an OKE Cluster

When you update a cluster, you can change the cluster name, Kubernetes version, and tags.

Best practice is to keep your clusters upgraded so that they are always running versions of Kubernetes that are currently supported by OKE. See the instructions in the following procedures to determine whether a newer supported version of Kubernetes is available.

Note:

If you set or modify any of the following tags, the new values are ignored: SSH key (OraclePCA.sshkey), number of nodes (OraclePCA.cpNodeCount), node shape (OraclePCA.cpNodeShape), or node shape configuration (OraclePCA.cpNodeShapeConfig). These values can be set only when you create the cluster.

Using the Compute Web UI

  1. On the dashboard, select Containers / View Kubernetes Clusters (OKE).

  2. In the clusters list, if a Kubernetes version update is available, an exclamation point icon is displayed next to the Kubernetes Version number. To upgrade to a newer version, select the Actions menu and select Upgrade Available. Select a new version from the drop-down menu.

    Alternatively, on the cluster details page, select Upgrade Available next to the Kubernetes Version number, or select the Upgrade button at the top of the page.

  3. On the clusters list page, select the name of the cluster that you want to update.

  4. At the top of the cluster details page, select the Edit button.

    Do not specify values for the OraclePCA-OKE.cluster_id defined tag or for the ClusterResourceIdentifier free-form tag. These tag values are system-generated and only applied to nodes (instances), not to the cluster resource.

  5. When you are finished making changes, select Save Changes.

Using the OCI CLI

  1. Get the OCID of the cluster that you want to update: oci ce cluster list

  2. Check whether a newer version of Kubernetes is available.

    Run the get cluster command: oci ce cluster get

    If the value of available-kubernetes-upgrades is not the empty set, specify one of the listed versions as the --kubernetes-version in the update cluster command.

  3. Run the update cluster command.

    If you specify the --defined-tags or --freeform-tags options, do not specify values for the OraclePCA-OKE.cluster_id defined tag or for the ClusterResourceIdentifier free-form tag. These tag values are system-generated and only applied to nodes (instances), not to the cluster resource.

    Example:

    $ oci ce cluster update --cluster-id ocid1.cluster.unique_ID \
    --kubernetes-version newer_kubernetes_version --name new_cluster_name