This page discusses what settings you can update in your admin cluster and user clusters.

Typically, you change a single setting in a configuration file, and then run the `gkectl update` command with the appropriate parameters. To update multiple settings, change one setting at a time and run the command repeatedly.

The `gkectl update` command takes one of the following forms, along with the parameters appropriate for the feature you want to update:

- `gkectl update credentials` - Use this to [update cluster credentials](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/updating-cluster-credentials).

- `gkectl update admin` - Run this command after you make a change in the [admin cluster configuration file](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/admin-cluster-configuration-file) so as to update the admin cluster.

- `gkectl update cluster` - Run this command after you make a change in the [user cluster configuration file](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/user-cluster-configuration-file) so as to update the user cluster.

## Admin cluster updates

You can update various features of your admin cluster.

### Allocate additional static IP addresses

If your configuration uses static IP addresses, you must check how many you are using and add additional ones if needed, when you [upgrade an admin workstation or admin cluster](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/upgrading#verify_ips).

### Enable or disable node resizing for the control-plane nodes of a user cluster

You can [enable](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/node-auto-resize#enable_node_resizing_for_the_control-plane_nodes_of_a_user_cluster) or [disable](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/node-auto-resize#disable_node_resizing_for_the_control-plane_nodes_of_a_user_cluster) automatic resizing of the control-plane nodes for the user cluster. These nodes are in the admin cluster.

### Enable or disable cluster backup

For an admin cluster, you can [enable cluster backup](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/back-up-and-restore-an-admin-cluster-with-gkectl#enable_the_admin_cluster_backup_feature) or [disable cluster backup](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/back-up-and-restore-an-admin-cluster-with-gkectl#disable_the_admin_cluster_backup_feature).

### Enable or disable vSphere resource metrics

If you change the value of [`stackdriver.disableVsphereResourceMetrics`](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/admin-cluster-configuration-file#stackdriver-disablevsphereresourcemetrics-field) in the admin cluster configuration file, run this command to update your configuration:

```
gkectl update admin --kubeconfig ADMIN_CLUSTER_KUBECONFIG --config ADMIN_CLUSTER_CONFIG_FILE
```

### Update vCenter certificate reference for the admin cluster

If your vCenter certificate has changed, [update the vCenter certificate reference](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/update-vcenter-certificate). You must update both the admin cluster and all user clusters.

### Enable automatic resizing of addon nodes for the admin cluster (preview)

You can [enable](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/node-auto-resize#enable_node_resizing_for_the_add-on_nodes_of_an_admin_cluster) or [disable](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/node-auto-resize#disable_node_resizing_for_the_add-on_nodes_of_an_admin_cluster) automatic resizing of addon nodes for the admin cluster.

### Enable or disable automatic node repair for the admin cluster (preview)

You can enable or disable automatic node repair for your admin cluster by changing the appropriate setting in the admin cluster configuration file, and running the `gkectl update admin` command.

- [Enable node repair and health checking for an existing admin cluster](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/node-auto-repair#enabling_node_repair_and_health_checking_for_an_existing_admin_cluster)

- [Disable node repair and health checking for an existing admin cluster](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/node-auto-repair#disabling_node_repair_and_health_checking_for_an_admin_cluster)

### Enable or disable anti-affinity groups (preview)

If you change the value of `antiAffinityGroups.enabled` in the admin cluster
configuration file, run the following command to update your configuration:

```
gkectl update admin --kubeconfig ADMIN_CLUSTER_KUBECONFIG --config ADMIN_CLUSTER_CONFIG_FILE
```

Replace the following:

- `ADMIN_CLUSTER_KUBECONFIG`: the path of your kubeconfig file. You
  can omit this flag if the file is in your current directory and has the name
  `kubeconfig`.

- `ADMIN_CLUSTER_CONFIG_FILE`: the path of your admin cluster
  configuration file. You can omit this flag if the file is in your current
  directory and has the name `admin-cluster.yaml`.

> [!NOTE]
> **Note:** If you change `antiAffinityGroups` settings, that triggers the re-creation of admin cluster add-on nodes and user cluster control-plane nodes in the admin cluster through a rolling update so that the corresponding virtual machine antiaffinity rules and node labels can be updated accordingly. This process might cause temporary disruption to the system workloads running on these nodes. Use caution if you make changes of this kind.

### Rotate a connect-register service account key for the admin cluster

To rotate a connect-register service account key:

1. Create a new connect-register [service account key file](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/service-accounts#connect_register_service_account).

2. Edit the [gkeConnect.registerServiceAccountKeyPath](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/admin-cluster-configuration-file#gkeconnect-registerserviceaccount-field) field in the admin cluster configuration file to point to the path of the new key file.

3. Run the `gkectl update admin` command.

## User cluster updates

You can update your user clusters by editing the setting in the [user configuration file](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/user-cluster-configuration-file) and then running `gkectl update cluster` with the appropriate parameters. Here are the changes you can make to your user clusters.

### Allocate additional static IP addresses

If your configuration uses static IP addresses, you must check how many you are using and add additional ones if needed, when you make one of these changes:

- [Resize a user cluster](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/resizing-a-user-cluster#static-ips).

- [Create or update a node pool](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/managing-node-pools#troubleshooting).

- [Upgrade a user cluster](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/upgrading#verify_ips).

### Resize a user cluster by updating the `nodePool` settings

You can [resize a user cluster](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/resizing-a-user-cluster) by updating the `replicas` value in the `nodePools` section, and then running the `gkectl update cluster` command.

### Enable or disable vSphere resource metrics

You can [enable or disable vSphere resource metrics](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/user-cluster-configuration-file#stackdriver-disablevsphereresourcemetrics-field) in the user cluster configuration file, and then run the `gkectl update cluster` command.

### Update vCenter certificate reference for user clusters

If your vCenter certificate has changed, [update the vCenter certificate reference](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/update-vcenter-certificate). You must update both the admin cluster and all user clusters.

### Register a user cluster

When you create a cluster, you can register it by filling out the `gkeConnect` section in the user cluster configuration file before creating it. If you did not register the cluster at the time of creation, you can subsequently [register an existing user cluster](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/connecting-to-a-cluster#cluster_registration) by editing the configuration file to add the `gkeConnect` section and then run the `gkectl update cluster` command.

### Enable or disable automatic node repair for user clusters

You can enable or disable automatic node repair for your user by changing the appropriate setting in the user cluster configuration file, and running the `gkectl update cluster` command.

- [Enable node repair and health checking for an existing user cluster](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/node-auto-repair#disabling_node_repair_and_health_checking_for_a_user_cluster)

- [Disable node repair and health checking for an existing user cluster](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/node-auto-repair#disabling_node_repair_and_health_checking_for_a_user_cluster)

### Auto-resizing a node in a user cluster

To [enable auto-resizing](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/node-auto-resize) of a node in a user cluster, edit the user cluster configuration file
and run the `gkectl update` command.

### Enable or disable cloud audit logging on a user cluster

You can [enable cloud audit logging](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/audit-logging#enabling_on_an_existing_user_cluster) or [disable cloud audit logging](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/audit-logging#disabling_cloud_audit_logs_on_an_existing_user_cluster).

### Disable vSphere CSI driver

By default, the vSphere CSI driver is enabled. You can [disable the vSphere CSI driver](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/using-vsphere-csi-driver#disabling_vsphere_csi_driver).

### Rotate a connect-register service account key for a user cluster

To rotate a connect-register service account key:

1. Create a new connect-register [service account key file](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/service-accounts#connect_register_service_account).

2. Edit the [gkeConnect.registerServiceAccountKeyPath](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.8/how-to/user-cluster-configuration-file#gkeconnect-registerserviceaccount-field) field in the user cluster configuration file to point to the path of the new key file.

3. Run the `gkectl update cluster` command.