← 返回命令列表

Linux command

gcloud-container 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Create GKE cluster

gcloud container clusters create [name] --zone=[zone]

List clusters

gcloud container clusters list

Get credentials

gcloud container clusters get-credentials [name] --zone=[zone]

Delete cluster

gcloud container clusters delete [name] --zone=[zone]

Resize node pool

gcloud container clusters resize [name] --node-pool=[pool] --num-nodes=[3]

说明

gcloud container provides comprehensive management for Google Kubernetes Engine (GKE), Google's managed Kubernetes service. It handles the complete lifecycle of Kubernetes clusters without requiring manual setup of master nodes or control plane components. The clusters subcommand creates and manages GKE clusters with customizable node configurations, network settings, and Kubernetes versions. Node pools allow heterogeneous clusters with different machine types or configurations for different workload types. Scaling operations can adjust cluster capacity by modifying node pool sizes. A critical feature is get-credentials, which configures kubectl by writing cluster authentication details to your kubeconfig file. This seamlessly connects the standard Kubernetes CLI tools to your GKE clusters. The command integrates with Google Container Registry for private image storage and supports advanced features like cluster autoscaling, node auto-repair, and automatic Kubernetes version upgrades.

参数

clusters _CMD_
GKE cluster management.
node-pools _CMD_
Node pool operations.
images _CMD_
Container image operations.
get-credentials _CLUSTER_
Configure kubectl for cluster.
--zone _ZONE_
Cluster zone.
--help
Display help information.

FAQ

What is the gcloud-container command used for?

gcloud container provides comprehensive management for Google Kubernetes Engine (GKE), Google's managed Kubernetes service. It handles the complete lifecycle of Kubernetes clusters without requiring manual setup of master nodes or control plane components. The clusters subcommand creates and manages GKE clusters with customizable node configurations, network settings, and Kubernetes versions. Node pools allow heterogeneous clusters with different machine types or configurations for different workload types. Scaling operations can adjust cluster capacity by modifying node pool sizes. A critical feature is get-credentials, which configures kubectl by writing cluster authentication details to your kubeconfig file. This seamlessly connects the standard Kubernetes CLI tools to your GKE clusters. The command integrates with Google Container Registry for private image storage and supports advanced features like cluster autoscaling, node auto-repair, and automatic Kubernetes version upgrades.

How do I run a basic gcloud-container example?

Run `gcloud container clusters create [name] --zone=[zone]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does clusters _CMD_ do in gcloud-container?

GKE cluster management.