gcloud-container
Manage Google Kubernetes Engine (GKE) clusters
TLDR
Register gcloud as a Docker credential helper
Create a cluster to run GKE containers
List clusters for running GKE containers
Update kubeconfig to get kubectl to use a GKE cluster
List tag and digest metadata for a container image
Describe an existing cluster for running containers
SYNOPSIS
gcloud container COMMAND [options]
PARAMETERS
clusters
Commands for managing Google Kubernetes Engine (GKE) clusters. This includes operations like creating, deleting, resizing, and configuring GKE clusters.
node-pools
Commands for managing node pools within GKE clusters. Node pools allow you to define groups of nodes with specific configurations, such as machine types or disk sizes.
images
(Historically) Commands for managing container images stored in Google Container Registry (GCR). While still functional for GCR, for new projects and advanced features, `gcloud artifacts` is recommended for Google Artifact Registry (GAR).
binauthz
Commands for interacting with Binary Authorization, a service that helps ensure only trusted images are deployed on GKE or Cloud Run.
registries
(Deprecated) Provides information about container registries linked to your Google Cloud project. Largely superseded by `gcloud artifacts` for managing Artifact Registry.
get-server-config
Retrieves the GKE server configuration, which includes information about supported Kubernetes versions and node pool configurations.
DESCRIPTION
The `gcloud container` command group provides a comprehensive interface for interacting with Google Cloud's container services. Its primary focus is on managing Google Kubernetes Engine (GKE) clusters, including operations such as creating, deleting, updating, and scaling clusters and their node pools. It also historically managed Google Container Registry (GCR) images, though `gcloud artifacts` is now the preferred command for Google Artifact Registry (GAR) images.
This command group serves as the central point for cloud developers and administrators to automate and script container-related tasks, integrate with CI/CD pipelines, and perform ad-hoc management of containerized workloads running on Google Cloud.
CAVEATS
The `gcloud container` is a command group, not a standalone executable command. It must be followed by a sub-command (e.g., `clusters`, `node-pools`, `images`).
While `gcloud container images` still works for Google Container Registry (GCR), for managing images in Google Artifact Registry (GAR), the dedicated `gcloud artifacts` command group offers more comprehensive and future-proof functionality.
HISTORY
The `gcloud container` command group evolved alongside Google Kubernetes Engine (GKE), which was launched in 2014 as Google Container Engine. As Kubernetes gained prominence, the `gcloud` CLI expanded its `container` group to provide robust management capabilities. Initially, it was the primary interface for Google Container Registry (GCR) images. More recently, with the introduction of Google Artifact Registry (GAR) as a unified package manager, the `gcloud artifacts` command group was introduced, leading to a partial shift in image management functionality, though `gcloud container images` remains functional for GCR. Its development tracks closely with the continuous evolution of containerization and orchestration services on Google Cloud.