mcpField
G
gke-cluster-lifecycle

gke-cluster-lifecycle

github.com/googlecloudplatformCloud & DevOps16947 installsUpdated 2d ago
Repository

About gke-cluster-lifecycle

gke-cluster-lifecycle is a skill for people managing Google Kubernetes Engine (GKE) clusters. It covers release channels, node capacity during upgrades, and blue-green node pool migration.

Key features

  1. 01Choose GKE release channels
  2. 02Configure surge upgrades
  3. 03Perform blue-green node pool upgrades
  4. 04Schedule maintenance windows
  5. 05Test upgrades in non-production

Use cases

  1. 01Choose an upgrade cadence for production clusters
  2. 02Limit node disruption during upgrades
  3. 03Migrate workloads for high-risk upgrades
  4. 04Validate cluster upgrades before production

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/googlecloudplatform/gke-mcp --skill gke-cluster-lifecycle

After installing, type/gke-cluster-lifecyclein Claude Code to confirm it loaded.

Details

From the project README

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:

  1. Create a new node pool with the new version and appropriate taints (using --node-taints).
  2. Cordon and drain the old node pool gradually.
  3. Delete the old node pool once empty.

Best Practices

  1. Use Release Channels: Always enroll production clusters in a release channel (preferably Stable or Regular).
  2. Configure Surge Upgrades: Use max-surge-upgrade to ensure availability during upgrades.
  3. Use Maintenance Windows: Configure maintenance windows to ensure upgrades only happen during off-peak hours (see gke-reliability).
  4. Test in Non-Prod: Always test upgrades in a staging environment before applying them to production.

Comments

Markdown supported