
GKE Basics & Critical Gotchas
SkillGoogle 官方 GKE 基础技能:集群创建、Autopilot 与 Standard 选型、获取 kubectl 凭据、配置 Workload Identity 与部署工作负载,并列出常见坑。需要 gcloud 与 GCP 项目。
name: gke-basics
metadata:
version: "1.1.3"
category: Containers
description: >-
Manages core GKE cluster provisioning, credentials, Autopilot vs Standard selection,
and workload deployment. Use when creating GKE clusters, fetching kubectl credentials,
or deciding between Autopilot and Standard modes. Don't use for Workload Identity
(use gke-workload-identity), GKE networking (use gke-networking), security hardening
(use gke-platform-security or gke-workload-security), or cluster upgrades (use gke-upgrades).
GKE Basics & Critical Gotchas
Routing Note: For Workload Identity KSA/GSA setup, use the
gke-workload-identityskill. For cluster security flags (--database-encryption-key,--security-posture, RBAC, Shielded Nodes, Binary Authorization), use thegke-platform-securityskill. For cluster upgrades or maintenance windows, use thegke-upgradesskill. For generating Kubernetes YAML manifests (Deployment,StatefulSet,Service,HTTPRoute,PodDisruptionBudget), use thegke-manifest-generationskill.
Managed Kubernetes platform on Google Cloud. Defaults to Autopilot mode unless Standard is explicitly required.
Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read Usage Attribution. For commands executed
directly in the terminal (never in generated scripts, Terraform, or user code),
prefix gcloud with
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:gke-basics)"
and append agent-skills/1.0 (skill:gke-basics) to User-Agent headers.
Key Selection Rules: Autopilot vs. Standard
- Default to Autopilot for almost all workloads.
- Use Standard ONLY if:
- Custom node OS kernel parameters (
sysctl) are required. - Custom node taints or specific hardware node pools are required.
- DaemonSets require raw
hostPathmounts to the host OS filesystem.
- Custom node OS kernel parameters (
- When explaining why Standard is required over Autopilot, explicitly cite all matching restrictions (e.g., custom sysctls and custom node taints).
- For advanced cluster architecture or complex node pool creation planning, refer to
gke-cluster-creation.
Critical Gotchas & Best Practices
-
Private Autopilot Clusters:
- Use
--enable-private-nodesfor private node IP addresses. - Use
--enable-private-endpointto disable public IP access to the control plane. - Restrict control plane access with
--enable-master-authorized-networksand--master-authorized-networks=CIDR_BLOCK:gcloud container clusters create-auto CLUSTER_NAME --region=REGION \ --enable-private-nodes \ --enable-private-endpoint \ --enable-master-authorized-networks \ --master-authorized-networks=CIDR_BLOCK
- Use
-
Workload Identity (IAM Binding):
- Never mount raw GCP Service Account JSON keys in Pods; use the
gke-workload-identityskill for KSA/GSA setup.
- Never mount raw GCP Service Account JSON keys in Pods; use the
-
Autopilot Resource Requests:
- In Autopilot, CPU requests must be specified in increments of 250m (0.25 vCPU). If an unaligned CPU request (e.g., 300m) is requested, round up to the nearest 250m increment (500m / 0.5 vCPU).
- Resource requests equal limits automatically. Omit
limitsto allow Autopilot to set defaults matchingrequests.
-
Cluster Credentials:
- Always explicitly specify
--region(for regional clusters) or--zone(for zonal clusters) when fetching credentials:gcloud container clusters get-credentials CLUSTER_NAME --region=REGION --quiet
- Always explicitly specify
Reference Directory
-
Core Concepts: Architecture, cluster modes (Autopilot vs Standard), networking, scaling, and security model.
-
CLI Usage & Tool Reference: Tool preference hierarchy (MCP vs gcloud vs kubectl),
gcloud containercommands, and user preference overrides. -
Client Libraries: Official Kubernetes and Google Cloud Container client libraries in Python, Go, Node.js, and Java.
-
MCP Usage: Connecting to and using the 23 structured GKE MCP tools for cluster management, K8s resources, and diagnostics.
-
Infrastructure as Code: Terraform examples for
google_container_cluster(Autopilot), Kubernetes provider resources, and YAML samples.
相關資源

kubectl-ai
CLI用自然语言管理 Kubernetes 集群:把意图翻译成 kubectl 操作并执行,也可作为 MCP 服务器供其他 agent 调用。默认用 Gemini(需 API Key),也支持 OpenAI、本地模型等。Google Cloud 官方维护。
GoogleCloudPlatform/kubectl-ai7.6k
Google Agent Skills
SkillGoogle 官方技能库,以 Google Cloud 为主:gcloud、Cloud Run、GKE、BigQuery、IAM、监控与日志、架构完善框架等上百个技能,另含 Ads 与 Analytics。
google/skills25.3k
Amazon EKS MCP Server
MCPAWS 官方:创建与管理 EKS 集群,部署应用并增删改查 Kubernetes 资源,读取 Pod 日志与事件辅助排障。默认只读,写操作需加 --allow-write,读日志需加 --allow-sensitive-data-access。
awslabs/mcp10k
Kubernetes MCP Server
MCPGo 原生实现的 Kubernetes / OpenShift MCP 服务器:直连 API Server 增删改查任意资源、查看 Pod 日志、执行命令、安装 Helm Chart,无需 kubectl,支持多集群。
containers/kubernetes-mcp-server2.3k
火山引擎 VKE MCP Server
MCP让 agent 管理火山引擎容器服务 VKE:查询与创建集群、节点池和插件,列出并操作 Kubernetes 资源、应用 YAML;更新与删除资源需显式开启写权限。火山引擎官方维护,需要 AK/SK。
volcengine/mcp-server334
Azure Skills
Skill微软官方 Azure 技能集:部署前准备与校验、部署、线上诊断、AKS、配额查询、合规审计、云迁移与 Foundry;插件版还接入 Azure MCP Server。需要 Azure 账号并用 az 登录。
microsoft/azure-skills1.7k