Updating the Connect agent using a private registry
Stay organized with collections
Save and categorize content based on your preferences.
This topic explains how to update the
Connect Agent if you
use a private Docker registry. For information about Connect, see
the product's documentation.
Overview
If you choose to register an Google Distributed Cloud user cluster with Google Cloud console, a
Kubernetes Deployment called the Connect agent is created in the
cluster. The Connect agent establishes a long-lived, encrypted
connection between the cluster and Google Cloud console.
Sometimes Google updates the Connect agent. If you use a private
registry with your cluster, follow these instructions to update the
Connect agent.
Pull updated Connect agent image
Pull the Connect agent image from gcr.io and push it into your
registry:
[USER_CLUSTER_NAME] is the name of a registered user cluster,
as it appears in Google Cloud console.
[CLUSTER_CONTEXT] is the cluster's context as it appears in
the kubeconfig file. To get this value, run kubectl config current-context.
[CONNECT_SA_KEY_FILE] is the path to the connect service account's JSON key file.
[KUBECONFIG_PATH] is the path to the user cluster's kubeconfig.
[DOCKER_CONFIG_PATH] is path to a JSON
Docker config
file.
The config.json file you used in the docker commands from the previous
section docker commands above might have additional unnecessary
credentials. You might prefer to fetch credentials from your cluster, which
ensures that you don't inadvertently put additional credentials in to your
cluster:
kubectl get secret regcred \
-o jsonpath='{.data.\.dockerconfigjson}' -n gke-connect | \
base64 -d \ # On BSD systems (like macOS), use base64 -D
>private_registry_config.json
Pass the filepath of the created file as the value of the
--docker-credential-file flag, in place of [DOCKER_CONFIG_PATH]
above.
[PROJECT_ID] is the project ID of the project where the user cluster is registered.
To learn how to list all projects in your organization, refer to Listing projects.
[[["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-08-29 UTC."],[[["\u003cp\u003eThis guide outlines how to update the Connect agent in user clusters that utilize a private Docker registry, essential for maintaining the encrypted connection between the cluster and Google Cloud console.\u003c/p\u003e\n"],["\u003cp\u003eThe Connect agent image must be pulled from \u003ccode\u003egcr.io\u003c/code\u003e and then pushed to your private registry before updating the user cluster registration.\u003c/p\u003e\n"],["\u003cp\u003eUpdating the user cluster registration requires the use of the Google Cloud CLI (version 281.0.0 or higher) with specific parameters including the user cluster name, context, service account key file, kubeconfig path, private registry host, and docker credential file.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003econfig.json\u003c/code\u003e file is used for Docker credentials, and fetching credentials directly from the cluster using \u003ccode\u003ekubectl\u003c/code\u003e is recommended to avoid including unnecessary credentials.\u003c/p\u003e\n"],["\u003cp\u003eThe user must be aware that this product or feature is in Alpha, and is subject to the "Pre-GA Offerings Terms" and comes "as is" with limited support.\u003c/p\u003e\n"]]],[],null,["# Updating the Connect agent using a private registry\n\n| **Alpha**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThis topic explains how to update the\n[Connect Agent](/anthos/multicluster-management/connect/overview#agent) if you\nuse a private Docker registry. For information about Connect, see\nthe product's [documentation](/anthos/multicluster-management/connect).\n\nOverview\n--------\n\nIf you choose to register an Google Distributed Cloud user cluster with Google Cloud console, a\nKubernetes Deployment called the Connect agent is created in the\ncluster. The Connect agent establishes a long-lived, encrypted\nconnection between the cluster and Google Cloud console.\n\nSometimes Google updates the Connect agent. If you use a private\nregistry with your cluster, follow these instructions to update the\nConnect agent.\n\nPull updated Connect agent image\n--------------------------------\n\nPull the Connect agent image from `gcr.io` and push it into your\nregistry: \n\n```\ndocker pull gcr.io/gkeconnect/gkeconnect-gce:release\ndocker tag gcr.io/gkeconnect/gkeconnect-gce:release \\\n [PRIVATE_REGISTRY_HOST]/gkeconnect/gkeconnect-gce:release\ndocker push [PRIVATE_REGISTRY_HOST]/gkeconnect/gkeconnect-gce:release\n```\n\nwhere \u003cvar translate=\"no\"\u003e[PRIVATE_REGISTRY_HOST]\u003c/var\u003e is the hostname or IP address of your\nprivate Docker registry.\n\nUpdate user cluster registration\n--------------------------------\n\n| **Note:** this requires Google Cloud CLI version 281.0.0 or higher.\n\nUpdate your user cluster's registration to Google Cloud console: \n\n```\ngcloud container fleet memberships register[USER_CLUSTER_NAME] \\\n --context=[CLUSTER_CONTEXT] \\\n --service-account-key-file=[CONNECT_SA_KEY_FILE] \\\n --kubeconfig=[KUBECONFIG_PATH] \\\n --docker-registry=[PRIVATE_REGISTRY_HOST] \\\n --docker-credential-file=[DOCKER_CONFIG_PATH] \\\n --project=[PROJECT_ID]\n```\n\nwhere:\n\n- \u003cvar translate=\"no\"\u003e[USER_CLUSTER_NAME]\u003c/var\u003e is the name of a registered user cluster, as it appears in Google Cloud console.\n- \u003cvar translate=\"no\"\u003e[CLUSTER_CONTEXT]\u003c/var\u003e is the cluster's context as it appears in the kubeconfig file. To get this value, run `kubectl config current-context`.\n- \u003cvar translate=\"no\"\u003e[CONNECT_SA_KEY_FILE]\u003c/var\u003e is the path to the connect service account's JSON key file.\n- \u003cvar translate=\"no\"\u003e[KUBECONFIG_PATH]\u003c/var\u003e is the path to the user cluster's kubeconfig.\n- \u003cvar translate=\"no\"\u003e[DOCKER_CONFIG_PATH]\u003c/var\u003e is path to a JSON\n [Docker config](https://docs.docker.com/engine/reference/commandline/cli/#configuration-files)\n file.\n\n The `config.json` file you used in the `docker` commands from the previous\n section `docker` commands above might have additional unnecessary\n credentials. You might prefer to fetch credentials from your cluster, which\n ensures that you don't inadvertently put additional credentials in to your\n cluster: \n\n ```\n kubectl get secret regcred \\\n -o jsonpath='{.data.\\.dockerconfigjson}' -n gke-connect | \\\n base64 -d \\ # On BSD systems (like macOS), use base64 -D\n \u003eprivate_registry_config.json\n ```\n\n Pass the filepath of the created file as the value of the\n `--docker-credential-file` flag, in place of \u003cvar translate=\"no\"\u003e[DOCKER_CONFIG_PATH]\u003c/var\u003e\n above.\n- \u003cvar translate=\"no\"\u003e[PROJECT_ID]\u003c/var\u003e is the [project ID](/resource-manager/docs/creating-managing-projects#identifying_projects) of the project where the user cluster is registered.\n To learn how to list all projects in your organization, refer to [Listing projects](/resource-manager/docs/creating-managing-projects#listing_projects)."]]