Updating Kubernetes
You can manage Kubernetes versions of your Managed Service for Kubernetes clusters.
For more information, see Kubernetes versions and updates in Managed Service for Kubernetes.
List of available Kubernetes versions
To get a list of available versions for a cluster:
- Go to the folder page and select Managed Service for Kubernetes.
- Click on the name of the Kubernetes cluster.
- Click Edit in the upper-right corner.
- View the list of available versions in the Kubernetes version field under Master configuration.
To get a list of available versions for a node group:
- Go to the folder page and select Managed Service for Kubernetes.
- Click on the name of the Kubernetes cluster and go to the Nodes manager tab.
- Select the node group from the list and click Edit in the upper-right corner.
- Get a list of available versions in the Kubernetes version field.
If you don't have the Nebius AI command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To get a list of available versions, run the command:
ncp managed-kubernetes list-versions
Updating a cluster
Configuring automatic updates when creating or editing a cluster
Note
You cannot disable automatic updates.
Select automatic update mode for the cluster and set the update schedule:
You can specify update settings when creating a cluster or updating its settings.
In the Maintenance frequency field, select the cluster update policy:
- Anytime: Select this option for Managed Service for Kubernetes to manage the update installation schedule.
- Daily: Set the start time and duration of the update.
- On selected days: Set the day, start time, and duration of the update. If necessary, select multiple options using the Add day and time button.
Set automatic update parameters when creating or updating a cluster:
ncp managed-kubernetes cluster <create or update> <cluster ID or name> \
...
--anytime-maintenance-window \
--daily-maintenance-window <value> \
--weekly-maintenance-window <value>
Where:
-
--anytime-maintenance-window
: Random update time for the cluster. -
--daily-maintenance-window
: The Daily update mode.Example of updating a cluster daily at 22:00 UTC, which lasts up to 10 hours:
--daily-maintenance-window 'start=22:00,duration=10h'
-
--weekly-maintenance-window
: Automatic update on specified days.Example of updating a cluster on Mondays and Tuesdays starting at 22:00 UTC, which lasts up to 10 hours:
--weekly-maintenance-window 'days=[monday,tuesday],start=22:00,duration=10h'
To set multiple maintenance periods, pass the settings of each of them in a separate
--weekly-maintenance-window
argument.Note
The
--daily-maintenance-window
and--weekly-maintenance-window
arguments require the--auto-upgrade
argument with thetrue
value. The update schedule will not be created if you set--auto-upgrade=false
.
You can find out the cluster ID and name in the list of clusters in the folder.
Manually updating the cluster version
If necessary, update the Kubernetes cluster version manually. Only the next minor version after the current one is available for updating. Updating to newer versions should be done in steps, for example: 1.19 → 1.20 → 1.21.
- Go to the folder page and select Managed Service for Kubernetes.
- Click on the name of the Kubernetes cluster.
- Click Edit in the upper-right corner.
- In the Kubernetes version field, select the Upgrade to version
option. - Click Save changes.
Specify the new version of Kubernetes in the value of the --version
argument:
ncp managed-kubernetes cluster update <cluster ID or name> \
--version=<new version number>
You can find out the cluster ID and name in the list of clusters in the folder.
Updating a node group
Configuring automatic updates of a node group
Note
You cannot disable automatic updates.
Select automatic update mode for the node group and set the desired update schedule:
You can specify update settings when creating a node group or updating its settings.
In the Maintenance frequency field, select the node group update policy:
- Anytime: Select this option for Managed Service for Kubernetes to manage the update installation schedule.
- Daily: Set the start time and duration of the update.
- On selected days: Set the day, start time, and duration of the update. If necessary, select multiple options using the Add day and time button.
Set automatic update parameters when creating or changing a node group.
ncp managed-kubernetes node-group <create or update> <node group ID or name> \
...
--auto-repair <true or false> \
--anytime-maintenance-window \
--daily-maintenance-window <value> \
--weekly-maintenance-window <value>
Where:
-
--auto-repair
: The mode for re-creating failed nodes.The
--auto-repair
mode is at the Preview stage. -
--anytime-maintenance-window
: Random update time for the node group. -
--daily-maintenance-window
: The Daily update mode.Example of updating a node group daily at 22:00 UTC, which lasts up to 10 hours:
--daily-maintenance-window 'start=22:00,duration=10h'
-
--weekly-maintenance-window
: Automatic update on specified days.Example of updating a node group on Mondays and Tuesdays from 22:00 UTC, which lasts 10 hours:
--weekly-maintenance-window 'days=[monday,tuesday],start=22:00,duration=10h'
To set multiple maintenance periods, pass the settings of each of them in a separate
--weekly-maintenance-window
argument.Note
The
--daily-maintenance-window
and--weekly-maintenance-window
arguments require the--auto-upgrade
argument with thetrue
value.
The update schedule will not be created if you set--auto-upgrade=false
.
You can find out the ID and name of the node group in a list of groups in a cluster.
Manually updating a node group version
To update Kubernetes version on nodes, update it for the cluster. Nodes will be updated automatically.