Updating an OKE Cluster

On Compute Cloud@Customer, when you update an OKE cluster, you can change the cluster name, Kubernetes version, and tags.

Best practice is to keep your clusters upgraded so that they're 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.

    1. In the Compute Cloud@Customer Console navigation menu, select Containers, then select Kubernetes Clusters.
    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 (An image of the three dot icon.) 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 Upgrade at the top of the page.

    3. Select the name of the cluster that you want to update.

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

      Don't 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're finished making changes, select Save Changes.

  • Use the oci ce cluster update command and required parameters to update the details of a cluster.

    oci ce cluster update --cluster-id <cluster_OCID> [OPTIONS]
    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 isn't 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, don't 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
                     

    For a complete list of CLI commands, flags, and options, see the Command Line Reference.

  • Use the UpdateCluster operation to update the details of a cluster.

    For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.