GCP: determining whether GKE cluster mode is Standard or Autopilot

If you need to determine at the CLI whether a GKE cluster is managed using Standard or Autopilot mode, this is available by using gcloud to describe the cluster.

# identify cluster and location
gcloud container clusters list
cluster_name=<clusterName>
location_flag="--region=<region>" # OR --zone=<zone>

# returns 'True' if GKE AutoPilot cluster
# returns empty if standard GKE cluster
gcloud container clusters describe $cluster_name $location_flag --format="value(autopilot.enabled)"

 

REFERENCES

GKE mode of cluster operation, standard or Autopilot

GKE Autopilot overview