
Skill
gke-cluster-lifecycle
manage GKE cluster lifecycle and upgrades
Description
Guidance on managing the lifecycle and upgrades of Google Kubernetes Engine (GKE) clusters.
SKILL.md
GKE Cluster Lifecycle and Upgrades
This skill provides guidance on managing the lifecycle and upgrades of Google Kubernetes Engine (GKE) clusters.
Overview
Managing cluster upgrades is crucial for security and access to new features. GKE provides automated upgrades, but they must be configured to minimize disruption.
Workflows
1. Select Release Channels
Release channels allow you to choose the balance between stability and feature availability.
- Rapid: Newest features, less tested.
- Regular (Default): Good balance.
- Stable: Most tested, best for critical production workloads.
Command to set release channel:
gcloud container clusters update <cluster-name> \
--release-channel=stable \
--region <region>
2. Configure Surge Upgrades
Surge upgrades allow you to specify how many nodes can be created above the target size during an upgrade, minimizing disruption.
Example configuration:
gcloud container node-pools update <pool-name> \
--cluster=<cluster-name> \
--max-surge-upgrade=2 \
--max-unavailable-upgrade=0 \
--region <region>
Setting max-unavailable-upgrade=0 ensures that no nodes are taken offline before new ones are ready.
3. Implement Blue/Green Node Pool Upgrades
For high-risk upgrades, you can create a new node pool (Green) with the new version, test it, and then migrate workloads from the old node pool (Blue).
Steps:
- Create a new node pool with the new version and appropriate taints (using --node-taints).
- Cordon and drain the old node pool gradually.
- Delete the old node pool once empty.
Best Practices
- Use Release Channels: Always enroll production clusters in a release channel (preferably
StableorRegular). - Configure Surge Upgrades: Use
max-surge-upgradeto ensure availability during upgrades. - Use Maintenance Windows: Configure maintenance windows to ensure upgrades only happen during off-peak hours (see gke-reliability).
- Test in Non-Prod: Always test upgrades in a staging environment before applying them to production.
More skills from the gke-mcp repository
View all 25 skillscustom-golden-image-discovery
discover golden base images for GKE nodes
Jul 12DeploymentGoogle CloudKubernetesgke-ai-troubleshooting-handle-disruption-gpu-tpu
diagnose GPU and TPU workload disruptions
Jul 28DebuggingGoogle CloudKubernetesPerformancegke-ai-troubleshooting-jobset-interruption
diagnose GKE JobSet interruptions
Jul 12DebuggingGoogle CloudKubernetesObservabilitygke-ai-troubleshooting-skill-creation-guide
create GKE troubleshooting skill bundles
Jul 12DocumentationEngineeringGoogle CloudTechnical Writinggke-ai-troubleshooting-tpu-connection-failure-vbar-oom
diagnose GKE TPU connection failures
Jul 12DebuggingGoogle CloudKubernetesPerformancegke-app-onboarding
containerize and deploy apps to GKE
Jul 12ContainersDeploymentGoogle CloudKubernetes +1
More from Google Cloud
View publisherkb-search
search and extract local knowledge base documents
knowledge-catalog
Jul 12DocumentationKnowledge BaseSearchknowledge_catalog_discovery_agent
search and rank Knowledge Catalog data entries
knowledge-catalog
Jul 12Data AnalysisGoogle CloudKnowledge ManagementSearchcontributing
contribute to Cloud Foundation Fabric
cloud-foundation-fabric
Jul 31AutomationEngineeringGitHubGoogle Cloud +1fabric-builder
generate Terraform code for Google Cloud
cloud-foundation-fabric
Jul 12Google CloudInfrastructure as CodeTerraformfast-0-org-setup-prereqs
prepare prerequisites for FAST 0-org-setup
cloud-foundation-fabric
Jul 12Google CloudOperationsagent-aware-cli
design agent-aware command-line interfaces
vertex-ai-creative-studio
Jul 12CLIEngineeringGoogle Cloud