Modifying Kubernetes Cluster Properties
You can use Container Engine for Kubernetes to modify the properties of existing Kubernetes clusters.
You can change:
- the name of a cluster
- the number of node pools in a cluster by adding new node pools, or deleting existing node pools
- the version of Kubernetes to run on control plane nodes
- the enforcement of pod security policies
- access details for a cluster's Kubernetes API endpoint
- some properties of node pools and worker nodes (see Modifying Node Pool and Worker Node Properties)
However, note that you cannot change the master encryption key (if specified when the cluster was created).
Also note that you must not change the auto-generated names of resources that Container Engine for Kubernetes has created (such as the names of worker nodes).
Using the Console
To modify an existing Kubernetes cluster:
- In the Console, open the navigation menu and click Developer Services. Under Containers, click Kubernetes Clusters (OKE).
- Choose a Compartment you have permission to work in.
- On the Cluster List page, click the name of the cluster you want to modify.
- Click Edit Cluster to:
- Change the name of the cluster.
- Change whether pod security policies are being enforced (by enabling the cluster's PodSecurityPolicy admission controller). Note that you must create pod security policies before enabling the PodSecurityPolicy admission controller of an existing cluster that is already in production. We also strongly recommend you first verify the cluster's pod security policies in a development or test environment. That way, you can be sure the pod security policies work as you expect and correctly allow (or refuse) pods to start on the cluster. Also note that if you disable a cluster's PodSecurityPolicy admission controller, any pod security policies (along with roles, rolebindings, clusterroles, and clusterrolebindings) you've defined are not deleted, they are simply not enforced. See Using Pod Security Policies with Container Engine for Kubernetes.
- Change access details for the Kubernetes API endpoint, including the use of network security groups and whether to assign a public IP address to the Kubernetes API endpoint subnet. See Kubernetes Cluster Control Plane and Kubernetes API.
Note that if you change the cluster's name or whether pod security policies are being enforced, save those changes before changing access details for the Kubernetes API endpoint.
If a newer version of Kubernetes is available than the one running on the control plane nodes in the cluster, the Upgrade Available button is enabled. If you want to upgrade the control plane nodes to a newer version, click Upgrade Available (see Upgrading the Kubernetes Version on Control Plane Nodes in a Cluster).
Use the Cluster Details tab to see information about the cluster, including:
- The status of the cluster, and of the node pools in the cluster.
- The cluster's OCID.
- The Kubernetes version running on the control plane nodes in the cluster.
- The address of the Kubernetes API endpoint.
- Whether pod security policies are being enforced.
- Use the Cluster tags tab, the Initial load balancer tags tab, and the Initial block volume tags tab to add or modify:
- tags applied to the cluster
- tags applied to load balancers created by Kubernetes services of type LoadBalancer
- tags applied to block volumes created by Kubernetes persistent volume claims
Use the Node Pools tab to:
View information about each of the node pools in the cluster, including:
- The status of the node pool.
- The node pool's OCID.
- The configuration currently used when starting new worker nodes in the node pool, including the Kubernetes version, the shape, and the image.
- The availability domains, and different regional subnets (recommended) or AD-specific subnets hosting worker nodes.
Note that you can change some of these node pool and worker node properties (see Modifying Node Pool and Worker Node Properties).
Scale the cluster up or down by increasing or decreasing the number of node pools in the cluster:
- Add a new node pool to the cluster by clicking the Add Node Pool button and entering details for the new node pool.
- Delete a node pool by selecting Delete Node Pool from the Actions menu.
For more information, see Adding and Removing Node Pools.
Use the Quick Start tab to:
Set up access to the cluster (see Setting Up Cluster Access).
Download and deploy a sample Nginx application using the Kubernetes command line tool kubectl from the instructions in a manifest file (see Deploying a Sample Nginx App on a Cluster Using Kubectl).
Using the API
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.
Use the Update Cluster operation to modify an existing Kubernetes cluster.