Node Auto-Upgrades

This page explains how to configure node auto-upgrades in Kubernetes Engine.

Node auto-upgrades help you keep the nodes in your cluster or node pool up to date with the latest stable version of Kubernetes. Auto-Upgrades use the same update mechanism as manual node upgrades. For more information about upgrading, see Upgrading a Container Cluster.

Some benefits of using auto-upgrades:

  • Lower management overhead: You don't have to manually track and update to the latest version of Kubernetes.
  • Better security: Sometimes new binaries are released to fix a security issue. With auto-upgrades, Kubernetes Engine automatically ensures that security updates are applied and kept up to date.
  • Ease of use: Provides a simple way to keep your nodes up to date with the latest Kubernetes features.

Node pools with auto-upgrades enabled are automatically scheduled for upgrades when a new stable Kubernetes version becomes available. When the upgrade is performed, the node pool is upgraded to match the current cluster master version.

You can disable auto-upgrades on one more node pools at any time. However, disabling this feature does not halt in-progress upgrades.

Node auto-upgrades is not available for Alpha Clusters or clusters running the Ubuntu node image.

Creating a cluster or node pool with node auto-upgrades

Console

To create a cluster with auto-upgrades enabled for the default node pool, perform the following steps:

  1. Visit the Kubernetes Engine menu in GCP Console.

    Visit the Kubernetes Engine menu

  2. Click Create cluster.

  3. Configure your cluster as desired. Then, from the Automatic node upgrades drop-down menu, select Enabled.
  4. Click Create.

To create a node pool with auto-upgrades in an existing cluster:

  1. Visit the Kubernetes Engine menu in GCP Console.

    Visit the Kubernetes Engine menu

  2. Select your cluster.

  3. Click Edit.
  4. From the Node pools menu, click Add node pool.
  5. Configure your node pool as desired. Then, from the Automatic node upgrades drop-down menu, select Enabled.
  6. Click Save.

gcloud

To create a cluster with auto-upgrades enabled for the default node pool, specify the --enable-autoupgrade flag in thegcloud container cluster create command:

gcloud container clusters create [CLUSTER-NAME] --zone [COMPUTE-ZONE] --enable-autoupgrade

To create a node pool with auto-upgrades:

gcloud container node-pools create [NODE-POOL] --cluster [CLUSTER-NAME] --zone [COMPUTE-ZONE] --enable-autoupgrade

Enabling node auto-upgrades for an existing node pool

Console

To enable auto-upgrades for an existing node pool, perform the following steps:

  1. Visit the Kubernetes Engine menu in GCP Console.

    Visit the Kubernetes Engine menu

  2. Select your cluster.

  3. Click Edit.
  4. From the Node pools menu, click the Edit icon beside the desired node pool.
  5. From the Automatic node upgrades drop-down menu, select Enabled.
  6. Click Save.

gcloud

To enable auto-upgrades for an existing node pool, run the following command:

gcloud container node-pools update [NODE-POOL] --cluster [CLUSTER-NAME] --zone [COMPUTE-ZONE] --enable-autoupgrade

Disabling node auto-upgrades for an existing node pool

Console

To disable auto-upgrades for an existing node pool, perform the following steps:

  1. Visit the Kubernetes Engine menu in GCP Console.

    Visit the Kubernetes Engine menu

  2. Select your cluster.

  3. Click Edit.
  4. From the Node pools menu, click the Edit icon beside the desired node pool.
  5. From the Automatic node upgrades drop-down menu, select Disabled.
  6. Click Save.

gcloud

To disable auto-upgrades for an existing node pool, run the following command:

gcloud container node-pools update  [NODE-POOL] --cluster [CLUSTER-NAME] --zone [COMPUTE-ZONE] --no-enable-autoupgrade

フィードバックを送信...