Updating a Cluster
You can update some parameters of your Kubernetes clusters.
Updating a Cluster Using Cockpit
-
In the Projects dashboard, click the name of the project from which you want to update a cluster.
The project details panel appears. -
Click the Clusters tab.
The list of your clusters created within the project appears. -
Hover over the row of the cluster you want to update and click the
action menu.
A drop-down menu appears. -
Click
Update Cluster Settings.
The UPDATE CLUSTER SETTINGS dialog box appears. -
In the Allowed IPs field, type one or more IPs allowed to access the cluster or click Add my IP to add your current IP.
If you’re using a VPN, the detected IP is your VPN’s IP. In that case, type your machine’s local IP manually.
To remove access to the cluster, click
next to the IP.
-
(optional) In the Description field, type a description for the cluster.
-
(optional) Check or uncheck the Disable API termination box:
-
If the box is checked, you cannot delete the project through the API.
-
If the box is unchecked, you can delete the project through the API.
-
-
Click Update.
The cluster is updated.
Updating a Cluster Using octl
Updating the Configuration of a Cluster
The UpdateCluster command updates the configuration of an existing cluster.
$ octl kube api UpdateCluster <cluster_id> --profile "default" \
--Description "string" \
--AdmissionFlags.DisableAdmissionPlugins "string" \
--AdmissionFlags.EnableAdmissionPlugins "string" \
--Tags.Property1 "string" \
--Tags.Property2 "string" \
--AutoMaintenances.MinorUpgradeMaintenance.Enabled=true \
--AutoMaintenances.MinorUpgradeMaintenance.DurationHours 0 \
--AutoMaintenances.MinorUpgradeMaintenance.StartHour 12 \
--AutoMaintenances.MinorUpgradeMaintenance.WeekDay "Mon" \
--AutoMaintenances.MinorUpgradeMaintenance.Tz "UTC" \
--AutoMaintenances.PatchUpgradeMaintenance.Enabled=true \
--AutoMaintenances.PatchUpgradeMaintenance.DurationHours 0 \
--AutoMaintenances.PatchUpgradeMaintenance.StartHour 12 \
--AutoMaintenances.PatchUpgradeMaintenance.WeekDay "Mon" \
--AutoMaintenances.PatchUpgradeMaintenance.Tz "UTC" \
--MaintenanceWindow.DurationHours 23 \
--MaintenanceWindow.StartHour 23 \
--MaintenanceWindow.WeekDay "Mon" \
--MaintenanceWindow.Tz "UTC" \
--AdminWhitelist "string" \
--Quirks "string" \
--DisableApiTermination=true \
--Version "string" \
--ControlPlanes "string" \
--Auth.Oidc.IssuerUrl "string" \
--Auth.Oidc.ClientId "string" \
--Auth.Oidc.UsernameClaim "string" \
--Auth.Oidc.UsernamePrefix "string" \
--Auth.Oidc.GroupsClaim "string" \
--Auth.Oidc.GroupsPrefix "string" \
--Auth.Oidc.RequiredClaim.Claim "value"
This command contains the following options that you need to specify:
-
AdminWhitelist: (optional) The updated list of CIDR blocks or IPs allowed to access the cluster via the Kubernetes API. -
AdmissionFlags.DisableAdmissionPlugins: (optional) The list of Kubernetes admission plugins to disable. -
AdmissionFlags.EnableAdmissionPlugins: (optional) The list of Kubernetes admission plugins to enable. -
Auth.Oidc.ClientId: The client ID provided by the OIDC provider. This will be used by the cluster to connect to the server. -
Auth.Oidc.GroupsClaim: (optional) A JSON Web Token (JWT) claim provided by the OIDC provider. This will be used to retrieve the user’s group on the Kubernetes side. -
Auth.Oidc.GroupsPrefix: (optional) A prefix added to the Kubernetes group, to prevent clashing with existing names (for example,oidc:). -
Auth.Oidc.IssuerUrl: The server URL of the OIDC provider, using the HTTPS protocol (https://). -
Auth.Oidc.RequiredClaim: (optional) The key/value combination of OIDC claims that must be included in the ID token for the user to authenticate. If not specified, no claim-based restrictions are enforced.
Example:{"claim": "value"}. -
Auth.Oidc.UsernameClaim: (optional) A JSON Web Token (JWT) claim provided by the OIDC provider. This will be used to retrieve the username on the Kubernetes side. -
Auth.Oidc.UsernamePrefix: (optional) A prefix added to the Kubernetes username, to prevent clashing with existing names (for example,oidc:). -
AutoMaintenances.MinorUpgradeMaintenance.DurationHours: (optional) The duration of the maintenance window, in hours.
Minimum value:0. Maximum value:23. Default:0. -
AutoMaintenances.MinorUpgradeMaintenance.Enabled: (optional) If true, a maintenance window is enabled.
Default: true. -
AutoMaintenances.MinorUpgradeMaintenance.StartHour: (optional) The starting time of the maintenance window, in hours.
Minimum value:0. Maximum value:23. Default:12. -
AutoMaintenances.MinorUpgradeMaintenance.Tz: (optional) The timezone for the maintenance window.
Default:UTC. -
AutoMaintenances.MinorUpgradeMaintenance.WeekDay: (optional) The weekday on which the maintenance window begins.
Possible values:Mon|Tue|Wed|Thu|Fri|Sat|Sun|string. Default:Tue. -
AutoMaintenances.PatchUpgradeMaintenance.DurationHours: (optional) The duration of the maintenance window, in hours.
Minimum value:0. Maximum value:23. Default:0. -
AutoMaintenances.PatchUpgradeMaintenance.Enabled: (optional) If true, a maintenance window is enabled.
Default: true. -
AutoMaintenances.PatchUpgradeMaintenance.StartHour: (optional) The starting time of the maintenance window, in hours.
Minimum value:0. Maximum value:23. Default:12. -
AutoMaintenances.PatchUpgradeMaintenance.Tz: (optional) The timezone for the maintenance window.
Default:UTC. -
AutoMaintenances.PatchUpgradeMaintenance.WeekDay: (optional) The weekday on which the maintenance window begins.
Possible values:Mon|Tue|Wed|Thu|Fri|Sat|Sun|string. Default:Tue. -
ControlPlanes: (optional) The size of the control plane deployment for the cluster. -
Description: (optional) The updated description of the cluster. -
DisableApiTermination: (optional) If true, cluster deletion through the API is disabled. If false, it is enabled. -
MaintenanceWindow.DurationHours: (optional) The duration of the maintenance window, in hours.
Minimum value:0. Maximum value:23. Default:0. -
MaintenanceWindow.StartHour: (optional) The starting time of the maintenance window, in hours.
Minimum value:0. Maximum value:23. Default:12. -
MaintenanceWindow.Tz: (optional) The timezone for the maintenance window.
Default:UTC. -
MaintenanceWindow.WeekDay: (optional) The weekday on which the maintenance window begins.
Possible values:Mon|Tue|Wed|Thu|Fri|Sat|Sun|string. Default:Tue. -
Quirks: (optional) The updated list of special configurations or behaviors for the cluster. -
Tags: (optional) The updated key/value combinations of the tags associated with the cluster’s metadata, in the following format:"tags":{"TAGKEY1":"TAGVALUE1","TAGKEY2":"TAGVALUE2"}. -
Version: (optional) The updated version of Kubernetes for the cluster. For more information, see GetKubernetesVersions.
The UpdateCluster command returns the following elements:
-
ResponseContext: Information about the context of the response.-
RequestId: The ID of the API request.
-
-
Cluster: Information about the cluster.-
project_id: The ID of the project this cluster belongs to. -
id: The Universally Unique Identifier (UUID) of the cluster. -
name: A unique name for the cluster within the project. -
description: An optional description of the cluster.
Default:. -
cp_multi_az: If true, multi-Subregion deployment is enabled for the control plane. If false, it is disabled. -
cp_subregions: The Subregions on which the control plane components are deployed. -
version: The Kubernetes version deployed for the cluster. For more information, see GetKubernetesVersions. -
expected_version: The version of Kubernetes that is expected to be deployed during maintenance. -
cni: The Container Network Interface (CNI) used in the cluster. -
admin_lbu: If true, load balancer administration is enabled for cluster management. If false, it is disabled. -
admission_flags: The configuration for Kubernetes admission controllers.-
disable_admission_plugins: The list of Kubernetes admission plugins that are disabled.
Default:[]. -
enable_admission_plugins: The list of Kubernetes admission plugins that are enabled.
Default:[]. -
applied_admission_plugins: The list of admission plugins that are currently applied to the cluster.
Default:["CertificateApproval", "CertificateSigning", "CertificateSubjectRestriction", "ClusterTrustBundleAttest", "DefaultIngressClass", "DefaultStorageClass", "DefaultTolerationSeconds", "LimitRanger", "MutatingAdmissionWebhook", "NamespaceLifecycle", "PersistentVolumeClaimResize", "PodSecurity", "Priority", "ResourceQuota", "RuntimeClass", "ServiceAccount", "StorageObjectInUseProtection", "TaintNodesByCondition", "ValidatingAdmissionPolicy", "ValidatingAdmissionWebhook"].
-
-
cidr_pods: The CIDR block of the Kubernetes pods' network. -
cidr_service: The CIDR block of the Kubernetes services' network. -
cluster_dns: The IP of the cluster’s DNS service. -
tags: The key/value combinations of the tags associated with the cluster, in the following format:"tags":{"TAGKEY1":"TAGVALUE1","TAGKEY2":"TAGVALUE2"}.
Example:{"key": "value"}. -
auto_maintenances(deprecated): The configuration for automated maintenance windows.-
minor_upgrade_maintenance: The maintenance window configuration for minor Kubernetes upgrades.-
enabled: If true, a maintenance window is enabled.
Default: true. -
duration_hours: The duration of the maintenance window, in hours.
Minimum value:0. Maximum value:23. Default:0. -
start_hour: The starting time of the maintenance window, in hours.
Minimum value:0. Maximum value:23. Default:12. -
week_day: The weekday on which the maintenance window begins.
Possible values:Mon|Tue|Wed|Thu|Fri|Sat|Sun|string. Default:Tue. -
tz: The timezone for the maintenance window.
Default:UTC.
-
-
patch_upgrade_maintenance: The maintenance window configuration for patch Kubernetes upgrades.-
enabled: If true, a maintenance window is enabled.
Default: true. -
duration_hours: The duration of the maintenance window, in hours.
Minimum value:0. Maximum value:23. Default:0. -
start_hour: The starting time of the maintenance window, in hours.
Minimum value:0. Maximum value:23. Default:12. -
week_day: The weekday on which the maintenance window begins.
Possible values:Mon|Tue|Wed|Thu|Fri|Sat|Sun|string. Default:Tue. -
tz: The timezone for the maintenance window.
Default:UTC.
-
-
-
maintenance_window: The configuration for automated maintenance windows.-
duration_hours: The duration of the maintenance window, in hours.
Minimum value:0. Maximum value:23. -
start_hour: The starting time of the maintenance window, in hours.
Minimum value:0. Maximum value:23. -
week_day: The weekday on which the maintenance window begins.
Possible values:Mon|Tue|Wed|Thu|Fri|Sat|Sun|string. -
tz: The timezone for the maintenance window.
Default:UTC.
-
-
control_planes: The control plane sizing of the cluster. -
expected_control_planes: The type of control plane size that is expected. -
admin_whitelist: The list of CIDR blocks or IPs allowed to access the cluster via the Kubernetes API. -
statuses: The status information of the cluster.-
created_at: The timestamp when the cluster was created. -
deleted_at: The timestamp when the cluster was deleted (if applicable). -
updated_at: The timestamp when the cluster was last updated. -
status: The status of the cluster. -
available_upgrade: Any available version of Kubernetes for upgrade (if applicable). For more information, see GetKubernetesVersions.
Default:.
-
-
disable_api_termination: If true, cluster deletion through the API is disabled. If false, it is enabled.
Default: false. -
auth: The authentication strategy used to access the cluster.-
oidc: The configuration for authenticating to the cluster using OpenID Connect (OIDC).-
issuer-url: The server URL of the OIDC provider, using the HTTPS protocol (https://). -
client-id: The client ID provided by the OIDC provider. This will be used by the cluster to connect to the server. -
username-claim: A JSON Web Token (JWT) claim provided by the OIDC provider. This will be used to retrieve the username on the Kubernetes side. -
username-prefix: A prefix added to the Kubernetes username, to prevent clashing with existing names (for example,oidc:). -
groups-claim: A JSON Web Token (JWT) claim provided by the OIDC provider. This will be used to retrieve the user’s group on the Kubernetes side. -
groups-prefix: A prefix added to the Kubernetes group, to prevent clashing with existing names (for example,oidc:). -
required-claim: The key/value combination of OIDC claims that must be included in the ID token for the user to authenticate. If not specified, no claim-based restrictions are enforced.
Example:{"claim": "value"}.
-
-
-
{
"ResponseContext": {
"RequestId": "string"
},
"Cluster": {
"project_id": "string",
"id": "string",
"name": "string",
"description": "",
"cp_multi_az": true,
"cp_subregions": [
"string"
],
"version": "string",
"expected_version": "string",
"cni": "string",
"admin_lbu": true,
"admission_flags": {
"disable_admission_plugins": [],
"enable_admission_plugins": [],
"applied_admission_plugins": [
"CertificateApproval",
"CertificateSigning",
"CertificateSubjectRestriction",
"ClusterTrustBundleAttest",
"DefaultIngressClass",
"DefaultStorageClass",
"DefaultTolerationSeconds",
"LimitRanger",
"MutatingAdmissionWebhook",
"NamespaceLifecycle",
"PersistentVolumeClaimResize",
"PodSecurity",
"Priority",
"ResourceQuota",
"RuntimeClass",
"ServiceAccount",
"StorageObjectInUseProtection",
"TaintNodesByCondition",
"ValidatingAdmissionPolicy",
"ValidatingAdmissionWebhook"
]
},
"cidr_pods": "string",
"cidr_service": "string",
"cluster_dns": "string",
"tags": {
"key": "value"
},
"auto_maintenances": {
"minor_upgrade_maintenance": {
"enabled": true,
"duration_hours": 0,
"start_hour": 12,
"week_day": "Mon",
"tz": "UTC"
},
"patch_upgrade_maintenance": {
"enabled": true,
"duration_hours": 0,
"start_hour": 12,
"week_day": "Mon",
"tz": "UTC"
}
},
"maintenance_window": {
"duration_hours": 23,
"start_hour": 23,
"week_day": "Mon",
"tz": "UTC"
},
"control_planes": "string",
"expected_control_planes": "string",
"admin_whitelist": [
"string"
],
"statuses": {
"created_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"status": "string",
"available_upgrade": ""
},
"disable_api_termination": false,
"auth": {
"oidc": {
"issuer-url": "string",
"client-id": "string",
"username-claim": "string",
"username-prefix": "string",
"groups-claim": [
"string"
],
"groups-prefix": "string",
"required-claim": {
"claim": "value"
}
}
}
}
}
Upgrading the Kubernetes Version of a Cluster
The UpgradeCluster command upgrades a specific cluster to the latest available version of Kubernetes. For more information, see GetKubernetesVersions.
$ octl kube api UpgradeCluster <cluster_id> --profile "default"
The UpgradeCluster command returns the following elements:
-
ResponseContext: Information about the context of the response.-
RequestId: The ID of the API request.
-
-
Cluster: Information about the cluster.-
project_id: The ID of the project this cluster belongs to. -
id: The Universally Unique Identifier (UUID) of the cluster. -
name: A unique name for the cluster within the project. -
description: An optional description of the cluster.
Default:. -
cp_multi_az: If true, multi-Subregion deployment is enabled for the control plane. If false, it is disabled. -
cp_subregions: The Subregions on which the control plane components are deployed. -
version: The Kubernetes version deployed for the cluster. For more information, see GetKubernetesVersions. -
expected_version: The version of Kubernetes that is expected to be deployed during maintenance. -
cni: The Container Network Interface (CNI) used in the cluster. -
admin_lbu: If true, load balancer administration is enabled for cluster management. If false, it is disabled. -
admission_flags: The configuration for Kubernetes admission controllers.-
disable_admission_plugins: The list of Kubernetes admission plugins that are disabled.
Default:[]. -
enable_admission_plugins: The list of Kubernetes admission plugins that are enabled.
Default:[]. -
applied_admission_plugins: The list of admission plugins that are currently applied to the cluster.
Default:["CertificateApproval", "CertificateSigning", "CertificateSubjectRestriction", "ClusterTrustBundleAttest", "DefaultIngressClass", "DefaultStorageClass", "DefaultTolerationSeconds", "LimitRanger", "MutatingAdmissionWebhook", "NamespaceLifecycle", "PersistentVolumeClaimResize", "PodSecurity", "Priority", "ResourceQuota", "RuntimeClass", "ServiceAccount", "StorageObjectInUseProtection", "TaintNodesByCondition", "ValidatingAdmissionPolicy", "ValidatingAdmissionWebhook"].
-
-
cidr_pods: The CIDR block of the Kubernetes pods' network. -
cidr_service: The CIDR block of the Kubernetes services' network. -
cluster_dns: The IP of the cluster’s DNS service. -
tags: The key/value combinations of the tags associated with the cluster, in the following format:"tags":{"TAGKEY1":"TAGVALUE1","TAGKEY2":"TAGVALUE2"}.
Example:{"key": "value"}. -
auto_maintenances(deprecated): The configuration for automated maintenance windows.-
minor_upgrade_maintenance: The maintenance window configuration for minor Kubernetes upgrades.-
enabled: If true, a maintenance window is enabled.
Default: true. -
duration_hours: The duration of the maintenance window, in hours.
Minimum value:0. Maximum value:23. Default:0. -
start_hour: The starting time of the maintenance window, in hours.
Minimum value:0. Maximum value:23. Default:12. -
week_day: The weekday on which the maintenance window begins.
Possible values:Mon|Tue|Wed|Thu|Fri|Sat|Sun|string. Default:Tue. -
tz: The timezone for the maintenance window.
Default:UTC.
-
-
patch_upgrade_maintenance: The maintenance window configuration for patch Kubernetes upgrades.-
enabled: If true, a maintenance window is enabled.
Default: true. -
duration_hours: The duration of the maintenance window, in hours.
Minimum value:0. Maximum value:23. Default:0. -
start_hour: The starting time of the maintenance window, in hours.
Minimum value:0. Maximum value:23. Default:12. -
week_day: The weekday on which the maintenance window begins.
Possible values:Mon|Tue|Wed|Thu|Fri|Sat|Sun|string. Default:Tue. -
tz: The timezone for the maintenance window.
Default:UTC.
-
-
-
maintenance_window: The configuration for automated maintenance windows.-
duration_hours: The duration of the maintenance window, in hours.
Minimum value:0. Maximum value:23. -
start_hour: The starting time of the maintenance window, in hours.
Minimum value:0. Maximum value:23. -
week_day: The weekday on which the maintenance window begins.
Possible values:Mon|Tue|Wed|Thu|Fri|Sat|Sun|string. -
tz: The timezone for the maintenance window.
Default:UTC.
-
-
control_planes: The control plane sizing of the cluster. -
expected_control_planes: The type of control plane size that is expected. -
admin_whitelist: The list of CIDR blocks or IPs allowed to access the cluster via the Kubernetes API. -
statuses: The status information of the cluster.-
created_at: The timestamp when the cluster was created. -
deleted_at: The timestamp when the cluster was deleted (if applicable). -
updated_at: The timestamp when the cluster was last updated. -
status: The status of the cluster. -
available_upgrade: Any available version of Kubernetes for upgrade (if applicable). For more information, see GetKubernetesVersions.
Default:.
-
-
disable_api_termination: If true, cluster deletion through the API is disabled. If false, it is enabled.
Default: false. -
auth: The authentication strategy used to access the cluster.-
oidc: The configuration for authenticating to the cluster using OpenID Connect (OIDC).-
issuer-url: The server URL of the OIDC provider, using the HTTPS protocol (https://). -
client-id: The client ID provided by the OIDC provider. This will be used by the cluster to connect to the server. -
username-claim: A JSON Web Token (JWT) claim provided by the OIDC provider. This will be used to retrieve the username on the Kubernetes side. -
username-prefix: A prefix added to the Kubernetes username, to prevent clashing with existing names (for example,oidc:). -
groups-claim: A JSON Web Token (JWT) claim provided by the OIDC provider. This will be used to retrieve the user’s group on the Kubernetes side. -
groups-prefix: A prefix added to the Kubernetes group, to prevent clashing with existing names (for example,oidc:). -
required-claim: The key/value combination of OIDC claims that must be included in the ID token for the user to authenticate. If not specified, no claim-based restrictions are enforced.
Example:{"claim": "value"}.
-
-
-
{
"ResponseContext": {
"RequestId": "string"
},
"Cluster": {
"project_id": "string",
"id": "string",
"name": "string",
"description": "",
"cp_multi_az": true,
"cp_subregions": [
"string"
],
"version": "string",
"expected_version": "string",
"cni": "string",
"admin_lbu": true,
"admission_flags": {
"disable_admission_plugins": [],
"enable_admission_plugins": [],
"applied_admission_plugins": [
"CertificateApproval",
"CertificateSigning",
"CertificateSubjectRestriction",
"ClusterTrustBundleAttest",
"DefaultIngressClass",
"DefaultStorageClass",
"DefaultTolerationSeconds",
"LimitRanger",
"MutatingAdmissionWebhook",
"NamespaceLifecycle",
"PersistentVolumeClaimResize",
"PodSecurity",
"Priority",
"ResourceQuota",
"RuntimeClass",
"ServiceAccount",
"StorageObjectInUseProtection",
"TaintNodesByCondition",
"ValidatingAdmissionPolicy",
"ValidatingAdmissionWebhook"
]
},
"cidr_pods": "string",
"cidr_service": "string",
"cluster_dns": "string",
"tags": {
"key": "value"
},
"auto_maintenances": {
"minor_upgrade_maintenance": {
"enabled": true,
"duration_hours": 0,
"start_hour": 12,
"week_day": "Mon",
"tz": "UTC"
},
"patch_upgrade_maintenance": {
"enabled": true,
"duration_hours": 0,
"start_hour": 12,
"week_day": "Mon",
"tz": "UTC"
}
},
"maintenance_window": {
"duration_hours": 23,
"start_hour": 23,
"week_day": "Mon",
"tz": "UTC"
},
"control_planes": "string",
"expected_control_planes": "string",
"admin_whitelist": [
"string"
],
"statuses": {
"created_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"status": "string",
"available_upgrade": ""
},
"disable_api_termination": false,
"auth": {
"oidc": {
"issuer-url": "string",
"client-id": "string",
"username-claim": "string",
"username-prefix": "string",
"groups-claim": [
"string"
],
"groups-prefix": "string",
"required-claim": {
"claim": "value"
}
}
}
}
}
Updating a Cluster Using OKS CLI
|
You cannot update the |
To update the parameters of one of your clusters, use the cluster update command following this syntax:
$ oks-cli cluster update \
--project-name NAME_OF_PROJECT \
--cluster-name NAME_OF_CLUSTER \
--control-plane cp.3.masters.small \
--description "DESCRIPTION_OF_CLUSTER" \
--admin "1.2.3.4/32" \
--output json \
--version KUBERNETES_VERSION
|
During a cluster update, you can cancel the process and roll back to the previous version as long as the update has not yet completed. To do so, set the previous version as the target version. |
This command contains the following options that you need to specify:
-
cluster-name: The name of the cluster that you want to update. -
(optional)
admin: The IPs to be whitelisted, in CIDR notation and separated by commas. This range of one or multiple IPs is empty by default, and should be specified in order to manage the cluster after creation. -
(optional)
control-plane: The desired control plane sizing. To resize a control plane, see the Resizing a Control Plane section below. For more information, see Control Planes. -
(optional)
description: The updated description for the cluster. -
(optional)
disable-admission-plugins: The list of admission plugins from the default list that you want to disable. -
(optional)
disable-api-termination: The ability to delete the project through the API. Iftrue, project deletion is disabled. Iffalse, it is enabled. -
(optional)
enable-admission-plugins: The list of additional admission plugins you want to enable on the cluster. For more information about the admissions plugins, see the Kubernetes documentation. -
(optional)
filename: The name of the manifest file from which you want to update the cluster. If specified, the update parameters are read from the manifest file instead of being provided individually in the command. For more information, see Updating a Cluster Using a Manifest File. -
(optional)
output: The output format for the response (json|yaml). By default, the response format is JSON. -
(optional)
project-name: The name of the project containing the cluster. -
(optional)
quirk: Advanced keys and parameters to pass to the control plane of the project. This option is required for feature requests. -
(optional)
tags: The updated tags that you want to apply to cluster nodes. -
(optional)
version: The Kubernetes version to use for the cluster. For more information about the supported versions, see About OKS > Supported Kubernetes Versions. The latest patch for the specified version is automatically used.
The cluster update command returns the following elements:
-
project_id: The unique identifier of the project in which the cluster you updated is located. -
id: The unique identifier of the cluster you updated. -
name: The name of the cluster you updated. -
description: The updated description of the cluster.
{
"project_id": "2f4gc161-7b4c-4464-8f45-4f6daf4a09c8",
"id": "bcd8c536-36f4-422c-838f-189c23dd6253",
"name": "NAME_OF_CLUSTER",
"description": "DESCRIPTION_OF_CLUSTER"
}
Upgrading the Kubernetes Version
To upgrade the Kubernetes version, first run the cluster update command, then apply the upgrade to the cluster’s control plane:
-
Use the cluster upgrade command to upgrade the control plane of the cluster:
Request sample$ oks-cli cluster upgrade \ --cluster-name NAME_OF_CLUSTER \ --output jsonThis command contains the following options that you need to specify:
-
cluster-name: The name of the cluster. -
(optional)
project-name: The name of the project containing the cluster. -
(optional)
output: The output format for the response (json|yaml). By default, the response format is JSON.
-
-
Renew the node pools to upgrade the cluster’s worker nodes.
For more information about the upgrade process, see Tutorial: Upgrading the Kubernetes Version of a Cluster.
Resizing a Control Plane
|
-
Use the cluster update command to set a new control plane sizing for the cluster:
Request sample$ oks-cli cluster update \ --project-name NAME_OF_PROJECT \ --cluster-name NAME_OF_CLUSTER \ --control-plane cp.3.masters.smallYou can check the update status using the cluster get command, following this syntax:
Request sample$ oks-cli cluster get \ --cluster-name NAME_OF_CLUSTERAfter a successful update, the command returns the
expected_control_planeselement with your desired sizing. -
Use the cluster upgrade command to apply the changes to the control plane:
Request sample$ oks-cli cluster upgrade \ --cluster-name NAME_OF_CLUSTERThis command contains the following options that you need to specify:
-
cluster-name: The name of the cluster. -
(optional)
project-name: The name of the project containing the cluster. -
(optional)
output: The output format for the response (json|yaml). By default, the response format is JSON.
-
The upgrade can take up to a few minutes.
You can confirm that the control plane has been successfully resized using the cluster list command. For more information, see Listing Your Clusters.
Updating a Cluster Using a Manifest File
If you created your cluster using a manifest file, you can update it by modifying the manifest and specifying it with the filename option.
-
Modify the parameters that you want to update.
Manifest samplename: NAME_OF_CLUSTER description: DESCRIPTION_OF_CLUSTER version: VERSION_NUMBER control_planes: cp.3.masters.small admin_whitelist: - 1.2.3.4/32 - 5.6.7.8/32 disable_api_termination: false tags: tag1: this tag2: that -
Save the manifest file.
-
Update the cluster using the modified manifest:
$ oks-cli cluster update \ --project-name NAME_OF_PROJECT \ --cluster-name NAME_OF_CLUSTER \ --filename ~/PATH/NAME_OF_CLUSTER_FILE.yamlThis command contains the following options that you need to specify:
-
(optional)
project-name: The name of the project containing the cluster. -
cluster-name: The name of the cluster that you want to update. -
filename: The name of the modified manifest file.
-
Related Pages
Corresponding API Methods