1
---
2
name: gke-golden-path
3
description: >-
4
Provides GKE golden path configuration defaults, production readiness
5
checklists, and cluster default patterns. Use when designing GKE clusters,
6
verifying GKE production readiness, or checking configurations against
7
GKE defaults. Don't use for setting up workload autoscaling specifically (use
8
gke-workload-scaling instead).
9
metadata:
10
version: "1.1.1"
11
category: Containers
12
---
13
14
# GKE Golden Path Configuration
15
16
The golden path is the recommended Autopilot configuration for production
17
clusters. It defines sensible defaults — when the user requests different
18
settings, apply them and note relevant trade-offs. For setting up autoscaling
19
specifically, use `gke-cluster-autoscaler` for node autoscaling or
20
`gke-workload-scaling` for workload autoscaling (HPA/VPA).
21
22
> **MCP Tools:** `get_cluster`, `create_cluster`, `update_cluster`
23
24
## Attribution
25
26
**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you
27
MUST read [Usage Attribution](references/attribution.md). For commands executed
28
directly in the terminal (never in generated scripts, Terraform, or user code),
29
prefix `gcloud` with
30
`CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:gke-golden-path)"`
31
and append `agent-skills/1.0 (skill:gke-golden-path)` to `User-Agent` headers.
32
33
## Rules
34
35
1. **Default to the golden path.** Use golden path values unless the user
36
requests otherwise. When deviating, note trade-offs but respect the user's
37
choice.
38
2. **Day-0 vs Day-1.** Flag Day-0 decisions (networking, private nodes,
39
subnets, IP allocation) prominently — they are hard/impossible to change
40
after creation.
41
3. **Tool preference: MCP > gcloud > kubectl.** MCP is preferred as it directly
42
interfaces with GKE APIs with structured data, reducing shell syntax errors
43
and parsing ambiguities. See the `gke-basics` skill's CLI reference for full
44
coverage matrix and override options. If the user
45
says "use gcloud" or "use kubectl", respect that for the session.
46
4. **Document decisions and rationale**, especially for Day-0 choices and
47
golden path deviations.
48
49
## Required Inputs
50
51
If the user is unsure, use golden path defaults.
52
53
- **Project ID** (required)
54
- **Region** (required, e.g., `us-central1`)
55
- **Cluster name** (required)
56
- **Environment type**: dev/test or production (defaults to production)
57
- **Networking**: bring-your-own VPC/subnet or auto-create (default:
58
auto-create)
59
- **Scale expectations**: expected node/pod count, workload types
60
- **Cost constraints**: Spot VM tolerance, budget considerations
61
62
## Always-Apply Defaults
63
64
Recommended best practices applied by default. If the user requests a different
65
setting, apply it and briefly note the security or operational trade-off.
66
67
Setting | Golden Path Value
68
------------------------------------------------------------------ | -----------------
69
`autopilot.enabled` | `true`
70
`privateClusterConfig.enablePrivateNodes` | `true`
71
`masterAuthorizedNetworksConfig.privateEndpointEnforcementEnabled` | `true`
72
`secretManagerConfig.enabled` + `rotationInterval: 120s` | `true`
73
`rbacBindingConfig.enableInsecureBinding*` | `false` (both)
74
`workloadIdentityConfig.workloadPool` | enabled
75
`networkConfig.datapathProvider` | `ADVANCED_DATAPATH`
76
`networkConfig.dnsConfig.clusterDns` | `CLOUD_DNS`
77
`autoscaling.autoscalingProfile` | `OPTIMIZE_UTILIZATION`
78
`verticalPodAutoscaling.enabled` | `true`
79
`monitoringConfig` components | SYSTEM_COMPONENTS, STORAGE, POD, DEPLOYMENT, STATEFULSET, DAEMONSET, HPA, JOBSET, CADVISOR, KUBELET, DCGM, APISERVER, SCHEDULER, CONTROLLER_MANAGER
80
`loggingConfig` components | SYSTEM_COMPONENTS, WORKLOADS (enabled by default)
81
`advancedDatapathObservabilityConfig.enableMetrics` | `true`
82
`nodeConfig.shieldedInstanceConfig.enableSecureBoot` | `true`
83
`nodeConfig.workloadMetadataConfig.mode` | `GKE_METADATA`
84
`nodeConfig.gcfsConfig.enabled` / `gvnic.enabled` | `true` / `true`
85
`addonsConfig.statefulHaConfig.enabled` | `true`
86
Storage CSI drivers (Filestore, GCS FUSE, Parallelstore) | enabled
87
Pod Security Standards | `restricted` on production namespaces
88
89
## Customer-Configurable Settings
90
91
These have golden path defaults but customers may deviate with valid
92
justification. **Ask before changing.**
93
94
Setting | Default | Why Deviate
95
---------------------------------------- | ----------------------------------- | -----------
96
`dnsEndpointConfig.allowExternalTraffic` | `true` | Restrict if cluster only accessed from within VPC
97
`autoIpamConfig` / `createSubnetwork` | `true` / `true` | Customer has pre-existing VPC/subnets
98
`maxPodsPerNode` | `48` (this golden path's choice) | Halves per-node IP consumption (/25 instead of /24). Not a GKE default (Standard defaults to `110`, Autopilot to `32`); raise for high pod-density at the cost of more CIDR space
99
`subnetwork` | auto-created | Customer brings existing subnets
100
Release channel + maintenance windows | `REGULAR` channel with a recurring maintenance window | Add targeted maintenance exclusions (keep under ~6 months) only for critical freezes — see the `gke-upgrades` skill
101
`nodeConfig.bootDisk.diskType` | `pd-balanced` | `pd-ssd` for I/O-intensive, `pd-standard` for cost
102
103
> **Note**: Autopilot selects node machine types automatically (e.g.,
104
> `ek-standard-8` may appear in describe output); the machine type is not
105
> customer-configurable in Autopilot. Steer workload placement via
106
> ComputeClasses instead.
107
108
## Guardrails
109
110
- Do not request or output secrets (tokens, keys, service account JSON).
111
- Resolve project/cluster context from the conversation, MCP tools, or
112
`gcloud config get-value project`; ask the user only if it cannot be
113
resolved.
114
- For Day-0 decisions, always ask clarifying questions before proceeding.
115
- For Day-1 features, propose golden path defaults with trade-offs and let the
116
customer confirm.
117
- Do not promise zero downtime — see Upgrade Disruption below for what to
118
advise instead.
119
- When auditing existing clusters, compare against golden path and report
120
deviations with severity and remediation.
121
122
## Upgrade Disruption
123
124
**Never promise zero downtime for node upgrades, on any configuration.** Node
125
upgrades cordon and drain nodes, which evicts Pods. Draining honors
126
PodDisruptionBudgets and `terminationGracePeriodSeconds` for **up to one hour**,
127
after which GKE forcefully evicts the remaining Pods so the upgrade can proceed.
128
A PDB narrows the window; it cannot veto the upgrade. Say so plainly rather than
129
implying the disruption can be eliminated.
130
131
What to recommend, all four — not a subset:
132
133
- **PodDisruptionBudgets** with `minAvailable` set so eviction cannot take the
134
last healthy replica. A PDB that can never be satisfied stalls the drain for
135
an hour and then loses anyway.
136
- **At least 2 replicas**, spread across zones with topology spread
137
constraints. A single-replica Deployment has downtime by definition.
138
- **Readiness probes** that reflect real serving health, so traffic drains
139
before the Pod dies.
140
- **Surge upgrade settings** on the node pool. Surge is the default strategy;
141
the default is `maxSurge=1`, `maxUnavailable=0` — one extra node is created
142
and made ready before an old one is drained.
143
144
Setting | Controls | Default
145
---------------- | --------------------------------------------------- | -------
146
`maxSurge` | Additional nodes added per zone during the upgrade | `1`
147
`maxUnavailable` | Nodes simultaneously unavailable per zone | `0`
148
149
Nodes upgraded at once is the **sum** of the two, capped at 20 (Autopilot)
150
and 100 (Standard). Multi-zone node pools upgrade one zone at a time. Raising
151
`maxUnavailable` trades availability for speed; raising `maxSurge` trades
152
cost for availability.
153
154
> **Caveat**: `externalTrafficPolicy: Local` does not work with parallel node
155
> drains, so it constrains aggressive surge configurations.
156
157
For rollback procedures and maintenance windows, see the `gke-upgrades` skill.
158
159
## Golden Path Config
160
161
See [golden-path-autopilot.yaml](./assets/golden-path-autopilot.yaml) for the
162
full cluster-level policy settings.
163