Stay organized with collections
Save and categorize content based on your preferences.
To rotate the service account keys in Google Distributed Cloud, you update the
existing cluster credentials with the bmctl command. This service account key
rotation might be as part of your regular processes to update credentials, or in
response to a potential exposure of the keys. When you update cluster
credentials, the new information is passed to admin or hybrid clusters, or
automatically routed to affected user clusters managed by an admin cluster.
Cluster credentials that can be updated
Google Distributed Cloud clusters require multiple credentials when they are created.
You set the credentials in the cluster config when you create an admin,
standalone, or hybrid cluster. User clusters, as noted previously, are managed
by an admin cluster (or a hybrid cluster acting as admin), and will reuse the
same credentials from the admin cluster.
You can update the following credentials, and their corresponding secrets,
in Google Distributed Cloud clusters with the bmctl command:
SSH private key: Used for node access.
Artifact Registry key (anthos-baremetal-gcr): Service account key
used to authenticate with Artifact Registry for image pulling.
Connect agent service account key
(anthos-baremetal-connect): Service account key used by
Connect agent pods.
Connect register service account key
(anthos-baremetal-register): Service account key used to authenticate with
Hub when registering or unregistering a cluster.
Cloud operations service account key (anthos-baremetal-cloud-ops):
Service account key to authenticate with Google Cloud Observability (logging & monitoring)
APIs.
Update credentials with bmctl
When you create clusters, Google Distributed Cloud creates Kubernetes Secrets
based on your credential keys. If you generate new keys, you must update the
corresponding Secrets as described in the following steps. If the name or path
to your keys change, you must also update the corresponding cluster
configuration file.
Prepare the new values for the credentials you want to update:
ADMIN_KUBECONFIG: the path of the kubeconfig file
of the admin or self-managing cluster.
CLUSTER_NAME: the name of the cluster that you're
updating the SSH key for.
SSH_KEY_PATH: the path of the SSH key file. By
default, bmctl checks the SSH and service account key files specified
in the cluster configuration file. If bmctl finds an expired key file,
the command fails. If you have the new valid key file in a different
location than what's specified in the configuration file, include the
--ignore-validation-errors flag to avoid this failure.
For a complete list of the flags that you can use with the bmctl update
credentials command, see update
credentials in the bmctl
command reference.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-02 UTC."],[],[],null,["To rotate the service account keys in Google Distributed Cloud, you update the\nexisting cluster credentials with the `bmctl` command. This service account key\nrotation might be as part of your regular processes to update credentials, or in\nresponse to a potential exposure of the keys. When you update cluster\ncredentials, the new information is passed to admin or hybrid clusters, or\nautomatically routed to affected user clusters managed by an admin cluster.\n\nCluster credentials that can be updated\n\nGoogle Distributed Cloud clusters require multiple credentials when they are created.\nYou set the credentials in the cluster config when you create an admin,\nstandalone, or hybrid cluster. User clusters, as noted previously, are managed\nby an admin cluster (or a hybrid cluster acting as admin), and will reuse the\nsame credentials from the admin cluster.\n\nFor more information about creating clusters and different cluster types,\nsee [Installation overview: choosing a deployment model](/kubernetes-engine/distributed-cloud/bare-metal/docs/installing/install-prep).\n\nYou can update the following credentials, and their corresponding secrets,\nin Google Distributed Cloud clusters with the `bmctl` command:\n\n- **SSH private key**: Used for node access.\n- **Artifact Registry key** (`anthos-baremetal-gcr`): Service account key used to authenticate with Artifact Registry for image pulling.\n- **Connect agent service account key** (`anthos-baremetal-connect`): Service account key used by Connect agent pods.\n- **Connect register service account key** (`anthos-baremetal-register`): Service account key used to authenticate with Hub when registering or unregistering a cluster.\n- **Cloud operations service account key** (`anthos-baremetal-cloud-ops`): Service account key to authenticate with Google Cloud Observability (logging \\& monitoring) APIs.\n\nUpdate credentials with `bmctl`\n\nWhen you create clusters, Google Distributed Cloud creates Kubernetes Secrets\nbased on your credential keys. If you generate new keys, you must update the\ncorresponding Secrets as described in the following steps. If the name or path\nto your keys change, you must also update the corresponding cluster\nconfiguration file.\n\n1. Prepare the new values for the credentials you want to update:\n\n - You can\n [generate new Google service account keys](/iam/docs/keys-create-delete#creating)\n through the Google Cloud CLI or through the Google Cloud console.\n\n - Generate new SSH private key on the admin workstation and make sure the\n cluster node machines have the corresponding public key.\n\n2. Update the credentials section of your cluster configuration file with paths\n to the new keys.\n\n3. Update the corresponding cluster Secrets with the `bmctl update credentials`\n command, adding the appropriate flags.\n\n The following example updates the credentials for a new SSH private key: \n\n bmctl update credentials --kubeconfig \u003cvar translate=\"no\"\u003eADMIN_KUBECONFIG\u003c/var\u003e \\\n --cluster \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e \\\n --ssh-private-key-path \u003cvar translate=\"no\"\u003eSSH_KEY_PATH\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eADMIN_KUBECONFIG\u003c/var\u003e: the path of the kubeconfig file\n of the admin or self-managing cluster.\n\n - \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e: the name of the cluster that you're\n updating the SSH key for.\n\n - \u003cvar translate=\"no\"\u003eSSH_KEY_PATH\u003c/var\u003e: the path of the SSH key file. By\n default, `bmctl` checks the SSH and service account key files specified\n in the cluster configuration file. If `bmctl` finds an expired key file,\n the command fails. If you have the new valid key file in a different\n location than what's specified in the configuration file, include the\n `--ignore-validation-errors` flag to avoid this failure.\n\n For a complete list of the flags that you can use with the `bmctl update\n credentials` command, see [update\n credentials](/kubernetes-engine/distributed-cloud/bare-metal/docs/reference/bmctl#update_credentials) in the `bmctl`\n command reference."]]