| name | gcloud-anthos |
| description | Anthos / GKE Enterprise via gcloud (`gcloud anthos`). Anthos command Group — auth, config. |
gcloud anthos — Anthos / GKE Enterprise
Overview
gcloud anthos manages GKE Enterprise (formerly Anthos) platform building blocks from the command line: it provisions and operates Anthos Config Controller instances (a hosted bundle of Config Connector, Config Sync, and Policy Controller for declarative, GitOps-driven management of Google Cloud resources) and handles client-side authentication to attached/multi-cloud clusters. Reach for it when you need a managed KRM API host for fleet/infrastructure config, or when you need to generate a login config and authenticate kubectl against an Anthos cluster. Most day-to-day fleet, membership, and policy operations live under sibling groups (gcloud container fleet, gcloud container hub), while gcloud anthos itself focuses on Config Controller lifecycle and Anthos client login.
Quick reference — common workflows
1. Enable APIs and create a Config Controller instance
gcloud services enable krmapihosting.googleapis.com \
container.googleapis.com \
cloudresourcemanager.googleapis.com \
serviceusage.googleapis.com
gcloud anthos config controller create acc-default \
--location=us-central1
gcloud anthos config controller create acc-default \
--location=us-central1 \
--full-management
2. Get credentials and inspect an instance
gcloud anthos config controller get-credentials acc-default \
--location=us-central1
gcloud anthos config controller describe acc-default \
--location=us-central1
gcloud anthos config controller list
gcloud anthos config controller list --location=us-central1 --full-name
3. Retrieve the Config Connector identity and grant it access
gcloud anthos config controller get-config-connector-identity acc-default \
--location=us-central1
gcloud projects add-iam-policy-binding PROJECT_ID \
--member="serviceAccount:SA_EMAIL" \
--role=roles/editor
4. Monitor Config Controller operations
gcloud anthos config operations list --location=us-central1
gcloud anthos config operations describe OPERATION_ID \
--location=us-central1
5. Generate a login config and authenticate a cluster
gcloud anthos create-login-config \
--kubeconfig=my-kube-config.yaml \
--output=kubectl-anthos-config.yaml
gcloud anthos auth login \
--cluster=my-cluster \
--login-config=kubectl-anthos-config.yaml
gcloud anthos auth login --cluster=my-cluster \
--login-config=kubectl-anthos-config.yaml --dry-run
gcloud anthos auth login --cluster=my-cluster \
--server=https://my-api-server-url
6. Delete a Config Controller instance
gcloud anthos config controller delete acc-default \
--location=us-central1 --async
gcloud anthos config controller delete acc-default \
--location=us-central1
Command groups
| Group | Reference file | Commands | Description |
|---|
anthos auth | auth.md | 1 | Authenticate clusters using the Anthos client (auth login) |
anthos config | config.md | 8 | Config Controller instance lifecycle (config controller) and operations (config operations) |
| (top-level) | _commands.md | 1 | create-login-config — generate a login configuration file |
See index.md for a one-line index of all 10 GA commands.
Common flags & tips
beta / alpha
Capabilities not present in GA gcloud anthos:
| Command | Track | Notes |
|---|
gcloud beta anthos apply LOCAL_DIR | beta + alpha | Apply Anthos infrastructure configuration changes from a local directory |
gcloud beta anthos export CLUSTER | beta + alpha | Export an Anthos cluster's current configuration to a directory |
gcloud alpha anthos config controller update | alpha only | Update a Config Controller instance (no GA/beta equivalent) |
GA gcloud anthos provides only create-login-config, auth login, and the config controller / config operations subgroups.
Official documentation
See sources.md for the full citation record.