Gke Basics

作者 google55b4e13eba6d无许可证21K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库今天更新

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).

精选仅含说明DevOps & Cloud
AI 生成的概览

指导 GKE 集群创建、Autopilot 与 Standard 模式选择、凭据获取以及工作负载部署。

功能
提供创建和管理 Google Kubernetes Engine 集群的说明,包括在 Autopilot 与 Standard 模式之间选择、配置私有集群以及获取 kubectl 凭据。还涵盖 Autopilot 资源请求规则,并将 Workload Identity、网络、安全和升级等相关主题路由到其他技能。参考文件涵盖核心概念、CLI 用法、客户端库、MCP 工具和 Terraform 基础设施即代码。
适用场景
适用于创建 GKE 集群、获取 kubectl 凭据或在 Autopilot 与 Standard 模式之间做决定时。不适用于 Workload Identity、GKE 网络、安全加固或集群升级,这些由其他技能处理。
运行要求
需要具备 Google Cloud 访问权限,并安装 gcloud 和 kubectl 以运行文档中的命令;参考资料还涉及 MCP 工具、客户端库和 Terraform。不包含脚本,仅提供说明和参考文档。

GKE Basics & Critical Gotchas

Routing Note: For Workload Identity KSA/GSA setup, open gke-workload-identity/SKILL.md. For cluster security flags (--database-encryption-key, --security-posture, RBAC, Shielded Nodes, Binary Authorization), open gke-platform-security/SKILL.md. For cluster upgrades or maintenance windows, open gke-upgrades/SKILL.md. For generating Kubernetes YAML manifests (Deployment, StatefulSet, Service, HTTPRoute, PodDisruptionBudget), open gke-manifest-generation/SKILL.md.

Managed Kubernetes platform on Google Cloud. Defaults to Autopilot mode unless Standard is explicitly required.

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 hostPath mounts to the host OS filesystem.
  • 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

  1. Private Autopilot Clusters:

    • Use --enable-private-nodes for private node IP addresses.
    • Use --enable-private-endpoint to disable public IP access to the control plane.
    • Restrict control plane access with --enable-master-authorized-networks and --master-authorized-networks=CIDR_BLOCK:
      bash
      gcloud container clusters create-auto CLUSTER_NAME --region=REGION \  --enable-private-nodes \  --enable-private-endpoint \  --enable-master-authorized-networks \  --master-authorized-networks=CIDR_BLOCK
  2. Workload Identity (IAM Binding):

    • Never mount raw GCP Service Account JSON keys in Pods; open gke-workload-identity/SKILL.md for KSA/GSA setup.
  3. 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 limits to allow Autopilot to set defaults matching requests.
  4. Cluster Credentials:

    • Always explicitly specify --region (for regional clusters) or --zone (for zonal clusters) when fetching credentials:
      bash
      gcloud container clusters get-credentials CLUSTER_NAME --region=REGION --quiet

Reference Directory

  • Core Concepts [blocked]: Architecture, cluster modes (Autopilot vs Standard), networking, scaling, and security model.

  • CLI Usage & Tool Reference [blocked]: Tool preference hierarchy (MCP vs gcloud vs kubectl), gcloud container commands, and user preference overrides.

  • Client Libraries [blocked]: Official Kubernetes and Google Cloud Container client libraries in Python, Go, Node.js, and Java.

  • MCP Usage [blocked]: Connecting to and using the 23 structured GKE MCP tools for cluster management, K8s resources, and diagnostics.

  • Infrastructure as Code [blocked]: Terraform examples for google_container_cluster (Autopilot), Kubernetes provider resources, and YAML samples.

来源与署名

来源:google/skills位于skills/cloud/gke-basics提交55b4e13

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架

更多来自 google/skills 的技能