Skip to main content

List Kubernetes Clusters

Lists all clusters owned by a project in either the specified zone or all zones.

External Documentation

To learn more, visit the GCP documentation.

Basic Parameters

ParameterDescription
Project IDThe Google Developers Console project ID or project number.
ZoneThe name of the Google Compute Engine zone in which the cluster resides, or "-" for all zones.

Advanced Parameters

ParameterDescription
FieldsSelector specifying which fields to include in a partial response.

Example Output

{
"clusters": [
{
"name": "test",
"nodeConfig": {
"machineType": "e2-medium",
"diskSizeGb": 100,
"oauthScopes": [
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/logging.write",
"https://www.googleapis.com/auth/monitoring",
"https://www.googleapis.com/auth/service.management.readonly",
"https://www.googleapis.com/auth/servicecontrol",
"https://www.googleapis.com/auth/trace.append"
],
"metadata": {
"disable-legacy-endpoints": "true"
},
"imageType": "COS_CONTAINERD",
"serviceAccount": "default",
"diskType": "pd-standard",
"workloadMetadataConfig": {
"mode": "GKE_METADATA"
},
"shieldedInstanceConfig": {
"enableSecureBoot": true,
"enableIntegrityMonitoring": true
}
},
"masterAuth": {
"clusterCaCertificate": "asdadsa"
},
"loggingService": "logging.googleapis.com/kubernetes",
"monitoringService": "monitoring.googleapis.com/kubernetes",
"network": "default",
"addonsConfig": {
"httpLoadBalancing": {},
"horizontalPodAutoscaling": {},
"kubernetesDashboard": {
"disabled": true
},
"networkPolicyConfig": {
"disabled": true
},
"dnsCacheConfig": {
"enabled": true
},
"gcePersistentDiskCsiDriverConfig": {
"enabled": true
},
"gcpFilestoreCsiDriverConfig": {
"enabled": true
}
},
"subnetwork": "default",
"nodePools": [
{
"name": "default-pool",
"config": {
"machineType": "e2-medium",
"diskSizeGb": 100,
"oauthScopes": [
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/logging.write",
"https://www.googleapis.com/auth/monitoring",
"https://www.googleapis.com/auth/service.management.readonly",
"https://www.googleapis.com/auth/servicecontrol",
"https://www.googleapis.com/auth/trace.append"
],
"metadata": {
"disable-legacy-endpoints": "true"
},
"imageType": "COS_CONTAINERD",
"serviceAccount": "default",
"diskType": "pd-standard",
"workloadMetadataConfig": {
"mode": "GKE_METADATA"
},
"shieldedInstanceConfig": {
"enableSecureBoot": true,
"enableIntegrityMonitoring": true
}
},
"initialNodeCount": 1,
"autoscaling": {
"enabled": true,
"maxNodeCount": 1000,
"autoprovisioned": true,
"locationPolicy": "BALANCED"
},
"management": {
"autoUpgrade": true,
"autoRepair": true
},
"maxPodsConstraint": {
"maxPodsPerNode": "32"
},
"podIpv4CidrSize": 26,
"locations": [
"us-central1-c",
"us-central1-b"
],
"networkConfig": {
"podRange": "gke-test-pods-b76a84aa"
},
"selfLink": "https://blinkops.com",
"version": "1.24.7-gke.900",
"instanceGroupUrls": [
"https://blinkops.com",
"https://blinkops.com"
],
"status": "PROVISIONING",
"upgradeSettings": {
"maxSurge": 1,
"strategy": "SURGE"
}
}
],
"locations": [
"us-central1-b",
"us-central1-c",
"us-central1-f",
"us-central1-a"
],
"labelFingerprint": "a9dc16a7",
"legacyAbac": {},
"ipAllocationPolicy": {
"useIpAliases": true,
"clusterSecondaryRangeName": "gke-stability-cluster-pods-b76a84aa",
"servicesSecondaryRangeName": "gke-stability-cluster-services-b76a84aa",
"stackType": "IPV4"
},
"masterAuthorizedNetworksConfig": {},
"maintenancePolicy": {
"resourceVersion": "e3b0c442"
},
"binaryAuthorization": {
"evaluationMode": "DISABLED"
},
"autoscaling": {
"enableNodeAutoprovisioning": true,
"resourceLimits": [
{
"resourceType": "cpu",
"maximum": "1000000000"
},
{
"resourceType": "memory",
"maximum": "1000000000"
},
{
"resourceType": "nvidia-tesla-t4",
"maximum": "1000000000"
},
{
"resourceType": "nvidia-tesla-a100",
"maximum": "1000000000"
}
],
"autoscalingProfile": "OPTIMIZE_UTILIZATION",
"autoprovisioningNodePoolDefaults": {
"oauthScopes": [
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/logging.write",
"https://www.googleapis.com/auth/monitoring",
"https://www.googleapis.com/auth/service.management.readonly",
"https://www.googleapis.com/auth/servicecontrol",
"https://www.googleapis.com/auth/trace.append"
],
"serviceAccount": "default",
"upgradeSettings": {
"maxSurge": 1,
"strategy": "SURGE"
},
"management": {
"autoUpgrade": true,
"autoRepair": true
},
"imageType": "COS_CONTAINERD"
}
},
"networkConfig": {
"network": "projects/test/global/networks/default",
"subnetwork": "projects/test/regions/us-central1/subnetworks/default",
"enableIntraNodeVisibility": true,
"defaultSnatStatus": {},
"datapathProvider": "ADVANCED_DATAPATH",
"serviceExternalIpsConfig": {}
},
"defaultMaxPodsConstraint": {
"maxPodsPerNode": "110"
},
"authenticatorGroupsConfig": {},
"privateClusterConfig": {
"enablePrivateNodes": true,
"masterIpv4CidrBlock": "172.16.156.240/28",
"privateEndpoint": "172.16.156.242",
"peeringName": "gke-nbfbd34ab1ff0db0dbde-c36e-5568-peer"
},
"databaseEncryption": {
"state": "DECRYPTED"
},
"verticalPodAutoscaling": {
"enabled": true
},
"shieldedNodes": {
"enabled": true
},
"releaseChannel": {
"channel": "REGULAR"
},
"workloadIdentityConfig": {
"workloadPool": "test.svc.id.goog"
},
"notificationConfig": {
"pubsub": {}
},
"selfLink": "https://blinkops.com",
"zone": "us-central1",
"initialClusterVersion": "1.24.7-gke.900",
"currentMasterVersion": "1.24.7-gke.900",
"currentNodeVersion": "1.24.7-gke.900",
"createTime": "2022-12-29T17:05:00+00:00",
"status": "PROVISIONING",
"instanceGroupUrls": [
"https://blinkops.com",
"https://blinkops.com"
],
"location": "us-central1",
"autopilot": {
"enabled": true
},
"id": "b76a84aab4af48d3b492279d355e96b4a39e76a6f773455fa08be0220ac4e321",
"nodePoolDefaults": {
"nodeConfigDefaults": {
"loggingConfig": {
"variantConfig": {
"variant": "DEFAULT"
}
}
}
},
"loggingConfig": {
"componentConfig": {
"enableComponents": [
"SYSTEM_COMPONENTS",
"WORKLOADS"
]
}
},
"monitoringConfig": {
"componentConfig": {
"enableComponents": [
"SYSTEM_COMPONENTS"
]
}
},
"nodePoolAutoConfig": {}
}
]
}

Workflow Library Example

List Kubernetes Clusters with Gcp and Send Results Via Email

Workflow LibraryPreview this Workflow on desktop