A DevOps team manages a Google Kubernetes Engine (GKE) Standard cluster named `prod-cluster` in zone `us-central1-a`. The team wants to ensure that unhealthy nodes in the existing node pool named `worker-pool` are automatically detected and recreated, and that the nodes automatically update to match the control plane version when upgrades occur. Which TWO commands should the cloud engineer execute to configure these operational settings?
- gcloud container node-pools update worker-pool --cluster=prod-cluster --zone=us-central1-a --enable-autorepairAnswer
- gcloud container node-pools update worker-pool --cluster=prod-cluster --zone=us-central1-a --enable-autoupgradeAnswer
- Cgcloud container clusters update prod-cluster --zone=us-central1-a --enable-autoscaling --node-pool=worker-pool
- Dkubectl edit nodepool worker-pool --set autoRepair=true,autoUpgrade=true
Answer
Execute `gcloud container node-pools update worker-pool --cluster=prod-cluster --zone=us-central1-a --enable-autorepair` to enable automatic health monitoring and recreation, and `gcloud container node-pools update worker-pool --cluster=prod-cluster --zone=us-central1-a --enable-autoupgrade` to keep node software synchronized with control plane updates.
Enabling auto-repair (`--enable-autorepair`) instructs GKE to perform health checks on nodes in the pool and repair/recreate any that fail. Enabling auto-upgrade (`--enable-autoupgrade`) ensures nodes stay up-to-date with the cluster control plane version.
Step-by-Step Solution
Key Concept
GKE Node Pool Management (Auto-Repair and Auto-Upgrade)