clusters
Creates, updates, deletes, gets or lists a clusters
resource.
Overview
Name | clusters |
Type | Resource |
Id | google.container.clusters |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_clusters_get
- projects_zones_clusters_get
- projects_locations_clusters_list
- projects_zones_clusters_list
Successful response
Name | Datatype | Description |
---|---|---|
id | string | Output only. Unique id for the cluster. |
name | string | The name of this cluster. The name must be unique within this project and location (e.g. zone or region), and can be up to 40 characters with the following restrictions: * Lowercase letters, numbers, and hyphens only. * Must start with a letter. * Must end with a number or a letter. |
addonsConfig | object | Configurations for the various addons available to run in the cluster. (id: AddonsConfig) |
alphaClusterFeatureGates | array | The list of user specified Kubernetes feature gates. Each string represents the activation status of a feature gate (e.g. "featureX=true" or "featureX=false") |
anonymousAuthenticationConfig | object | Configuration for limiting anonymous access to all endpoints except the health checks. (id: AnonymousAuthenticationConfig) |
authenticatorGroupsConfig | object | Configuration controlling RBAC group membership information. (id: AuthenticatorGroupsConfig) |
autopilot | object | Autopilot configuration for the cluster. (id: Autopilot) |
autoscaling | object | Cluster-level autoscaling configuration. (id: ClusterAutoscaling) |
binaryAuthorization | object | Configuration for Binary Authorization. (id: BinaryAuthorization) |
clusterIpv4Cidr | string | The IP address range of the container pods in this cluster, in CIDR notation (e.g. 10.96.0.0/14 ). Leave blank to have one automatically chosen or specify a /14 block in 10.0.0.0/8 . |
compliancePostureConfig | object | Enable/Disable Compliance Posture features for the cluster. (id: CompliancePostureConfig) |
conditions | array | Which conditions caused the current cluster state. |
confidentialNodes | object | Configuration of Confidential Nodes. All the nodes in the cluster will be Confidential VM once enabled. (id: ConfidentialNodes) |
controlPlaneEndpointsConfig | object | Configuration for all cluster's control plane endpoints. (id: ControlPlaneEndpointsConfig) |
costManagementConfig | object | Configuration for the fine-grained cost management feature. (id: CostManagementConfig) |
createTime | string | Output only. The time the cluster was created, in RFC3339 text format. |
currentMasterVersion | string | Output only. The current software version of the master endpoint. |
currentNodeCount | integer (int32) | Output only. The number of nodes currently in the cluster. Deprecated. Call Kubernetes API directly to retrieve node information. |
currentNodeVersion | string | Output only. Deprecated, use NodePools.version instead. The current version of the node software components. If they are currently at multiple versions because they're in the process of being upgraded, this reflects the minimum version of all nodes. |
databaseEncryption | object | Configuration of etcd encryption. (id: DatabaseEncryption) |
defaultMaxPodsConstraint | object | The default constraint on the maximum number of pods that can be run simultaneously on a node in the node pool of this cluster. Only honored if cluster created with IP Alias support. (id: MaxPodsConstraint) |
description | string | An optional description of this cluster. |
enableK8sBetaApis | object | Beta APIs Config (id: K8sBetaAPIConfig) |
enableKubernetesAlpha | boolean | Kubernetes alpha features are enabled on this cluster. This includes alpha API groups (e.g. v1alpha1) and features that may not be production ready in the kubernetes version of the master and nodes. The cluster has no SLA for uptime and master/node upgrades are disabled. Alpha enabled clusters are automatically deleted thirty days after creation. |
enableTpu | boolean | Enable the ability to use Cloud TPUs in this cluster. This field is deprecated due to the deprecation of 2VM TPU. The end of life date for 2VM TPU is 2025-04-25. |
endpoint | string | Output only. The IP address of this cluster's master endpoint. The endpoint can be accessed from the internet at https://username:password@endpoint/ . See the masterAuth property of this resource for username and password information. |
enterpriseConfig | object | GKE Enterprise Configuration. (id: EnterpriseConfig) |
etag | string | This checksum is computed by the server based on the value of cluster fields, and may be sent on update requests to ensure the client has an up-to-date value before proceeding. |
expireTime | string | Output only. The time the cluster will be automatically deleted in RFC3339 text format. |
fleet | object | Fleet information for the cluster. (id: Fleet) |
gkeAutoUpgradeConfig | object | Configuration for GKE auto upgrades. (id: GkeAutoUpgradeConfig) |
identityServiceConfig | object | Configuration for Identity Service component. (id: IdentityServiceConfig) |
initialClusterVersion | string | The initial Kubernetes version for this cluster. Valid versions are those found in validMasterVersions returned by getServerConfig. The version can be upgraded over time; such upgrades are reflected in currentMasterVersion and currentNodeVersion. Users may specify either explicit versions offered by Kubernetes Engine or version aliases, which have the following behavior: - "latest": picks the highest valid Kubernetes version - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - "1.X.Y-gke.N": picks an explicit Kubernetes version - "","-": picks the default Kubernetes version |
initialNodeCount | integer (int32) | The number of nodes to create in this cluster. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota. For requests, this field should only be used in lieu of a "node_pool" object, since this configuration (along with the "node_config") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a node_pool at the same time. This field is deprecated, use node_pool.initial_node_count instead. |
instanceGroupUrls | array | Output only. Deprecated. Use node_pools.instance_group_urls. |
ipAllocationPolicy | object | Configuration for cluster IP allocation. (id: IPAllocationPolicy) |
labelFingerprint | string | The fingerprint of the set of labels for this cluster. |
legacyAbac | object | Configuration for the legacy ABAC authorization mode. (id: LegacyAbac) |
location | string | Output only. The name of the Google Compute Engine zone or region in which the cluster resides. |
locations | array | The list of Google Compute Engine zones in which the cluster's nodes should be located. This field provides a default value if NodePool.Locations are not specified during node pool creation. Warning: changing cluster locations will update the NodePool.Locations of all node pools and will result in nodes being added and/or removed. |
loggingConfig | object | Logging configuration for the cluster. (id: LoggingConfig) |
loggingService | string | The logging service the cluster should use to write logs. Currently available options: * logging.googleapis.com/kubernetes - The Cloud Logging service with a Kubernetes-native resource model * logging.googleapis.com - The legacy Cloud Logging service (no longer available as of GKE 1.15). * none - no logs will be exported from the cluster. If left as an empty string,logging.googleapis.com/kubernetes will be used for GKE 1.14+ or logging.googleapis.com for earlier versions. |
maintenancePolicy | object | Configure the maintenance policy for this cluster. (id: MaintenancePolicy) |
masterAuth | object | The authentication information for accessing the master endpoint. If unspecified, the defaults are used: For clusters before v1.12, if master_auth is unspecified, username will be set to "admin", a random password will be generated, and a client certificate will be issued. (id: MasterAuth) |
masterAuthorizedNetworksConfig | object | The configuration options for master authorized networks feature. Deprecated: Use ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config instead. (id: MasterAuthorizedNetworksConfig) |
meshCertificates | object | Configuration for issuance of mTLS keys and certificates to Kubernetes pods. (id: MeshCertificates) |
monitoringConfig | object | Monitoring configuration for the cluster. (id: MonitoringConfig) |
monitoringService | string | The monitoring service the cluster should use to write metrics. Currently available options: * monitoring.googleapis.com/kubernetes - The Cloud Monitoring service with a Kubernetes-native resource model * monitoring.googleapis.com - The legacy Cloud Monitoring service (no longer available as of GKE 1.15). * none - No metrics will be exported from the cluster. If left as an empty string,monitoring.googleapis.com/kubernetes will be used for GKE 1.14+ or monitoring.googleapis.com for earlier versions. |
network | string | The name of the Google Compute Engine network to which the cluster is connected. If left unspecified, the default network will be used. |
networkConfig | object | Configuration for cluster networking. (id: NetworkConfig) |
networkPolicy | object | Configuration options for the NetworkPolicy feature. (id: NetworkPolicy) |
nodeConfig | object | Parameters used in creating the cluster's nodes. For requests, this field should only be used in lieu of a "node_pool" object, since this configuration (along with the "initial_node_count") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a node_pool at the same time. For responses, this field will be populated with the node configuration of the first node pool. (For configuration of each node pool, see node_pool.config ) If unspecified, the defaults are used. This field is deprecated, use node_pool.config instead. (id: NodeConfig) |
nodeIpv4CidrSize | integer (int32) | Output only. The size of the address space on each node for hosting containers. This is provisioned from within the container_ipv4_cidr range. This field will only be set when cluster is in route-based network mode. |
nodePoolAutoConfig | object | Node pool configs that apply to all auto-provisioned node pools in autopilot clusters and node auto-provisioning enabled clusters. (id: NodePoolAutoConfig) |
nodePoolDefaults | object | Default NodePool settings for the entire cluster. These settings are overridden if specified on the specific NodePool object. (id: NodePoolDefaults) |
nodePools | array | The node pools associated with this cluster. This field should not be set if "node_config" or "initial_node_count" are specified. |
notificationConfig | object | Notification configuration of the cluster. (id: NotificationConfig) |
parentProductConfig | object | The configuration of the parent product of the cluster. This field is used by Google internal products that are built on top of the GKE cluster and take the ownership of the cluster. (id: ParentProductConfig) |
podAutoscaling | object | The config for pod autoscaling. (id: PodAutoscaling) |
privateClusterConfig | object | Configuration for private cluster. (id: PrivateClusterConfig) |
rbacBindingConfig | object | RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created. (id: RBACBindingConfig) |
releaseChannel | object | Release channel configuration. If left unspecified on cluster creation and a version is specified, the cluster is enrolled in the most mature release channel where the version is available (first checking STABLE, then REGULAR, and finally RAPID). Otherwise, if no release channel configuration and no version is specified, the cluster is enrolled in the REGULAR channel with its default version. (id: ReleaseChannel) |
resourceLabels | object | The resource labels for the cluster to use to annotate any related Google Compute Engine resources. |
resourceUsageExportConfig | object | Configuration for exporting resource usages. Resource usage export is disabled when this config is unspecified. (id: ResourceUsageExportConfig) |
satisfiesPzi | boolean | Output only. Reserved for future use. |
satisfiesPzs | boolean | Output only. Reserved for future use. |
secretManagerConfig | object | Secret CSI driver configuration. (id: SecretManagerConfig) |
securityPostureConfig | object | Enable/Disable Security Posture API features for the cluster. (id: SecurityPostureConfig) |
selfLink | string | Output only. Server-defined URL for the resource. |
servicesIpv4Cidr | string | Output only. The IP address range of the Kubernetes services in this cluster, in CIDR notation (e.g. 1.2.3.4/29 ). Service addresses are typically put in the last /16 from the container CIDR. |
shieldedNodes | object | Shielded Nodes configuration. (id: ShieldedNodes) |
status | string | Output only. The current status of this cluster. |
statusMessage | string | Output only. Deprecated. Use conditions instead. Additional information about the current status of this cluster, if available. |
subnetwork | string | The name of the Google Compute Engine subnetwork to which the cluster is connected. |
tpuIpv4CidrBlock | string | Output only. The IP address range of the Cloud TPUs in this cluster, in CIDR notation (e.g. 1.2.3.4/29 ). This field is deprecated due to the deprecation of 2VM TPU. The end of life date for 2VM TPU is 2025-04-25. |
userManagedKeysConfig | object | The Custom keys configuration for the cluster. (id: UserManagedKeysConfig) |
verticalPodAutoscaling | object | Cluster-level Vertical Pod Autoscaling configuration. (id: VerticalPodAutoscaling) |
workloadIdentityConfig | object | Configuration for the use of Kubernetes Service Accounts in GCP IAM policies. (id: WorkloadIdentityConfig) |
zone | string | Output only. The name of the Google Compute Engine zone in which the cluster resides. This field is deprecated, use location instead. |
Successful response
Name | Datatype | Description |
---|---|---|
id | string | Output only. Unique id for the cluster. |
name | string | The name of this cluster. The name must be unique within this project and location (e.g. zone or region), and can be up to 40 characters with the following restrictions: * Lowercase letters, numbers, and hyphens only. * Must start with a letter. * Must end with a number or a letter. |
addonsConfig | object | Configurations for the various addons available to run in the cluster. (id: AddonsConfig) |
alphaClusterFeatureGates | array | The list of user specified Kubernetes feature gates. Each string represents the activation status of a feature gate (e.g. "featureX=true" or "featureX=false") |
anonymousAuthenticationConfig | object | Configuration for limiting anonymous access to all endpoints except the health checks. (id: AnonymousAuthenticationConfig) |
authenticatorGroupsConfig | object | Configuration controlling RBAC group membership information. (id: AuthenticatorGroupsConfig) |
autopilot | object | Autopilot configuration for the cluster. (id: Autopilot) |
autoscaling | object | Cluster-level autoscaling configuration. (id: ClusterAutoscaling) |
binaryAuthorization | object | Configuration for Binary Authorization. (id: BinaryAuthorization) |
clusterIpv4Cidr | string | The IP address range of the container pods in this cluster, in CIDR notation (e.g. 10.96.0.0/14 ). Leave blank to have one automatically chosen or specify a /14 block in 10.0.0.0/8 . |
compliancePostureConfig | object | Enable/Disable Compliance Posture features for the cluster. (id: CompliancePostureConfig) |
conditions | array | Which conditions caused the current cluster state. |
confidentialNodes | object | Configuration of Confidential Nodes. All the nodes in the cluster will be Confidential VM once enabled. (id: ConfidentialNodes) |
controlPlaneEndpointsConfig | object | Configuration for all cluster's control plane endpoints. (id: ControlPlaneEndpointsConfig) |
costManagementConfig | object | Configuration for the fine-grained cost management feature. (id: CostManagementConfig) |
createTime | string | Output only. The time the cluster was created, in RFC3339 text format. |
currentMasterVersion | string | Output only. The current software version of the master endpoint. |
currentNodeCount | integer (int32) | Output only. The number of nodes currently in the cluster. Deprecated. Call Kubernetes API directly to retrieve node information. |
currentNodeVersion | string | Output only. Deprecated, use NodePools.version instead. The current version of the node software components. If they are currently at multiple versions because they're in the process of being upgraded, this reflects the minimum version of all nodes. |
databaseEncryption | object | Configuration of etcd encryption. (id: DatabaseEncryption) |
defaultMaxPodsConstraint | object | The default constraint on the maximum number of pods that can be run simultaneously on a node in the node pool of this cluster. Only honored if cluster created with IP Alias support. (id: MaxPodsConstraint) |
description | string | An optional description of this cluster. |
enableK8sBetaApis | object | Beta APIs Config (id: K8sBetaAPIConfig) |
enableKubernetesAlpha | boolean | Kubernetes alpha features are enabled on this cluster. This includes alpha API groups (e.g. v1alpha1) and features that may not be production ready in the kubernetes version of the master and nodes. The cluster has no SLA for uptime and master/node upgrades are disabled. Alpha enabled clusters are automatically deleted thirty days after creation. |
enableTpu | boolean | Enable the ability to use Cloud TPUs in this cluster. This field is deprecated due to the deprecation of 2VM TPU. The end of life date for 2VM TPU is 2025-04-25. |
endpoint | string | Output only. The IP address of this cluster's master endpoint. The endpoint can be accessed from the internet at https://username:password@endpoint/ . See the masterAuth property of this resource for username and password information. |
enterpriseConfig | object | GKE Enterprise Configuration. (id: EnterpriseConfig) |
etag | string | This checksum is computed by the server based on the value of cluster fields, and may be sent on update requests to ensure the client has an up-to-date value before proceeding. |
expireTime | string | Output only. The time the cluster will be automatically deleted in RFC3339 text format. |
fleet | object | Fleet information for the cluster. (id: Fleet) |
gkeAutoUpgradeConfig | object | Configuration for GKE auto upgrades. (id: GkeAutoUpgradeConfig) |
identityServiceConfig | object | Configuration for Identity Service component. (id: IdentityServiceConfig) |
initialClusterVersion | string | The initial Kubernetes version for this cluster. Valid versions are those found in validMasterVersions returned by getServerConfig. The version can be upgraded over time; such upgrades are reflected in currentMasterVersion and currentNodeVersion. Users may specify either explicit versions offered by Kubernetes Engine or version aliases, which have the following behavior: - "latest": picks the highest valid Kubernetes version - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - "1.X.Y-gke.N": picks an explicit Kubernetes version - "","-": picks the default Kubernetes version |
initialNodeCount | integer (int32) | The number of nodes to create in this cluster. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota. For requests, this field should only be used in lieu of a "node_pool" object, since this configuration (along with the "node_config") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a node_pool at the same time. This field is deprecated, use node_pool.initial_node_count instead. |
instanceGroupUrls | array | Output only. Deprecated. Use node_pools.instance_group_urls. |
ipAllocationPolicy | object | Configuration for cluster IP allocation. (id: IPAllocationPolicy) |
labelFingerprint | string | The fingerprint of the set of labels for this cluster. |
legacyAbac | object | Configuration for the legacy ABAC authorization mode. (id: LegacyAbac) |
location | string | Output only. The name of the Google Compute Engine zone or region in which the cluster resides. |
locations | array | The list of Google Compute Engine zones in which the cluster's nodes should be located. This field provides a default value if NodePool.Locations are not specified during node pool creation. Warning: changing cluster locations will update the NodePool.Locations of all node pools and will result in nodes being added and/or removed. |
loggingConfig | object | Logging configuration for the cluster. (id: LoggingConfig) |
loggingService | string | The logging service the cluster should use to write logs. Currently available options: * logging.googleapis.com/kubernetes - The Cloud Logging service with a Kubernetes-native resource model * logging.googleapis.com - The legacy Cloud Logging service (no longer available as of GKE 1.15). * none - no logs will be exported from the cluster. If left as an empty string,logging.googleapis.com/kubernetes will be used for GKE 1.14+ or logging.googleapis.com for earlier versions. |
maintenancePolicy | object | Configure the maintenance policy for this cluster. (id: MaintenancePolicy) |
masterAuth | object | The authentication information for accessing the master endpoint. If unspecified, the defaults are used: For clusters before v1.12, if master_auth is unspecified, username will be set to "admin", a random password will be generated, and a client certificate will be issued. (id: MasterAuth) |
masterAuthorizedNetworksConfig | object | The configuration options for master authorized networks feature. Deprecated: Use ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config instead. (id: MasterAuthorizedNetworksConfig) |
meshCertificates | object | Configuration for issuance of mTLS keys and certificates to Kubernetes pods. (id: MeshCertificates) |
monitoringConfig | object | Monitoring configuration for the cluster. (id: MonitoringConfig) |
monitoringService | string | The monitoring service the cluster should use to write metrics. Currently available options: * monitoring.googleapis.com/kubernetes - The Cloud Monitoring service with a Kubernetes-native resource model * monitoring.googleapis.com - The legacy Cloud Monitoring service (no longer available as of GKE 1.15). * none - No metrics will be exported from the cluster. If left as an empty string,monitoring.googleapis.com/kubernetes will be used for GKE 1.14+ or monitoring.googleapis.com for earlier versions. |
network | string | The name of the Google Compute Engine network to which the cluster is connected. If left unspecified, the default network will be used. |
networkConfig | object | Configuration for cluster networking. (id: NetworkConfig) |
networkPolicy | object | Configuration options for the NetworkPolicy feature. (id: NetworkPolicy) |
nodeConfig | object | Parameters used in creating the cluster's nodes. For requests, this field should only be used in lieu of a "node_pool" object, since this configuration (along with the "initial_node_count") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a node_pool at the same time. For responses, this field will be populated with the node configuration of the first node pool. (For configuration of each node pool, see node_pool.config ) If unspecified, the defaults are used. This field is deprecated, use node_pool.config instead. (id: NodeConfig) |
nodeIpv4CidrSize | integer (int32) | Output only. The size of the address space on each node for hosting containers. This is provisioned from within the container_ipv4_cidr range. This field will only be set when cluster is in route-based network mode. |
nodePoolAutoConfig | object | Node pool configs that apply to all auto-provisioned node pools in autopilot clusters and node auto-provisioning enabled clusters. (id: NodePoolAutoConfig) |
nodePoolDefaults | object | Default NodePool settings for the entire cluster. These settings are overridden if specified on the specific NodePool object. (id: NodePoolDefaults) |
nodePools | array | The node pools associated with this cluster. This field should not be set if "node_config" or "initial_node_count" are specified. |
notificationConfig | object | Notification configuration of the cluster. (id: NotificationConfig) |
parentProductConfig | object | The configuration of the parent product of the cluster. This field is used by Google internal products that are built on top of the GKE cluster and take the ownership of the cluster. (id: ParentProductConfig) |
podAutoscaling | object | The config for pod autoscaling. (id: PodAutoscaling) |
privateClusterConfig | object | Configuration for private cluster. (id: PrivateClusterConfig) |
rbacBindingConfig | object | RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created. (id: RBACBindingConfig) |
releaseChannel | object | Release channel configuration. If left unspecified on cluster creation and a version is specified, the cluster is enrolled in the most mature release channel where the version is available (first checking STABLE, then REGULAR, and finally RAPID). Otherwise, if no release channel configuration and no version is specified, the cluster is enrolled in the REGULAR channel with its default version. (id: ReleaseChannel) |
resourceLabels | object | The resource labels for the cluster to use to annotate any related Google Compute Engine resources. |
resourceUsageExportConfig | object | Configuration for exporting resource usages. Resource usage export is disabled when this config is unspecified. (id: ResourceUsageExportConfig) |
satisfiesPzi | boolean | Output only. Reserved for future use. |
satisfiesPzs | boolean | Output only. Reserved for future use. |
secretManagerConfig | object | Secret CSI driver configuration. (id: SecretManagerConfig) |
securityPostureConfig | object | Enable/Disable Security Posture API features for the cluster. (id: SecurityPostureConfig) |
selfLink | string | Output only. Server-defined URL for the resource. |
servicesIpv4Cidr | string | Output only. The IP address range of the Kubernetes services in this cluster, in CIDR notation (e.g. 1.2.3.4/29 ). Service addresses are typically put in the last /16 from the container CIDR. |
shieldedNodes | object | Shielded Nodes configuration. (id: ShieldedNodes) |
status | string | Output only. The current status of this cluster. |
statusMessage | string | Output only. Deprecated. Use conditions instead. Additional information about the current status of this cluster, if available. |
subnetwork | string | The name of the Google Compute Engine subnetwork to which the cluster is connected. |
tpuIpv4CidrBlock | string | Output only. The IP address range of the Cloud TPUs in this cluster, in CIDR notation (e.g. 1.2.3.4/29 ). This field is deprecated due to the deprecation of 2VM TPU. The end of life date for 2VM TPU is 2025-04-25. |
userManagedKeysConfig | object | The Custom keys configuration for the cluster. (id: UserManagedKeysConfig) |
verticalPodAutoscaling | object | Cluster-level Vertical Pod Autoscaling configuration. (id: VerticalPodAutoscaling) |
workloadIdentityConfig | object | Configuration for the use of Kubernetes Service Accounts in GCP IAM policies. (id: WorkloadIdentityConfig) |
zone | string | Output only. The name of the Google Compute Engine zone in which the cluster resides. This field is deprecated, use location instead. |
Successful response
Name | Datatype | Description |
---|---|---|
id | string | Output only. Unique id for the cluster. |
name | string | The name of this cluster. The name must be unique within this project and location (e.g. zone or region), and can be up to 40 characters with the following restrictions: * Lowercase letters, numbers, and hyphens only. * Must start with a letter. * Must end with a number or a letter. |
addonsConfig | object | Configurations for the various addons available to run in the cluster. (id: AddonsConfig) |
alphaClusterFeatureGates | array | The list of user specified Kubernetes feature gates. Each string represents the activation status of a feature gate (e.g. "featureX=true" or "featureX=false") |
anonymousAuthenticationConfig | object | Configuration for limiting anonymous access to all endpoints except the health checks. (id: AnonymousAuthenticationConfig) |
authenticatorGroupsConfig | object | Configuration controlling RBAC group membership information. (id: AuthenticatorGroupsConfig) |
autopilot | object | Autopilot configuration for the cluster. (id: Autopilot) |
autoscaling | object | Cluster-level autoscaling configuration. (id: ClusterAutoscaling) |
binaryAuthorization | object | Configuration for Binary Authorization. (id: BinaryAuthorization) |
clusterIpv4Cidr | string | The IP address range of the container pods in this cluster, in CIDR notation (e.g. 10.96.0.0/14 ). Leave blank to have one automatically chosen or specify a /14 block in 10.0.0.0/8 . |
compliancePostureConfig | object | Enable/Disable Compliance Posture features for the cluster. (id: CompliancePostureConfig) |
conditions | array | Which conditions caused the current cluster state. |
confidentialNodes | object | Configuration of Confidential Nodes. All the nodes in the cluster will be Confidential VM once enabled. (id: ConfidentialNodes) |
controlPlaneEndpointsConfig | object | Configuration for all cluster's control plane endpoints. (id: ControlPlaneEndpointsConfig) |
costManagementConfig | object | Configuration for the fine-grained cost management feature. (id: CostManagementConfig) |
createTime | string | Output only. The time the cluster was created, in RFC3339 text format. |
currentMasterVersion | string | Output only. The current software version of the master endpoint. |
currentNodeCount | integer (int32) | Output only. The number of nodes currently in the cluster. Deprecated. Call Kubernetes API directly to retrieve node information. |
currentNodeVersion | string | Output only. Deprecated, use NodePools.version instead. The current version of the node software components. If they are currently at multiple versions because they're in the process of being upgraded, this reflects the minimum version of all nodes. |
databaseEncryption | object | Configuration of etcd encryption. (id: DatabaseEncryption) |
defaultMaxPodsConstraint | object | The default constraint on the maximum number of pods that can be run simultaneously on a node in the node pool of this cluster. Only honored if cluster created with IP Alias support. (id: MaxPodsConstraint) |
description | string | An optional description of this cluster. |
enableK8sBetaApis | object | Beta APIs Config (id: K8sBetaAPIConfig) |
enableKubernetesAlpha | boolean | Kubernetes alpha features are enabled on this cluster. This includes alpha API groups (e.g. v1alpha1) and features that may not be production ready in the kubernetes version of the master and nodes. The cluster has no SLA for uptime and master/node upgrades are disabled. Alpha enabled clusters are automatically deleted thirty days after creation. |
enableTpu | boolean | Enable the ability to use Cloud TPUs in this cluster. This field is deprecated due to the deprecation of 2VM TPU. The end of life date for 2VM TPU is 2025-04-25. |
endpoint | string | Output only. The IP address of this cluster's master endpoint. The endpoint can be accessed from the internet at https://username:password@endpoint/ . See the masterAuth property of this resource for username and password information. |
enterpriseConfig | object | GKE Enterprise Configuration. (id: EnterpriseConfig) |
etag | string | This checksum is computed by the server based on the value of cluster fields, and may be sent on update requests to ensure the client has an up-to-date value before proceeding. |
expireTime | string | Output only. The time the cluster will be automatically deleted in RFC3339 text format. |
fleet | object | Fleet information for the cluster. (id: Fleet) |
gkeAutoUpgradeConfig | object | Configuration for GKE auto upgrades. (id: GkeAutoUpgradeConfig) |
identityServiceConfig | object | Configuration for Identity Service component. (id: IdentityServiceConfig) |
initialClusterVersion | string | The initial Kubernetes version for this cluster. Valid versions are those found in validMasterVersions returned by getServerConfig. The version can be upgraded over time; such upgrades are reflected in currentMasterVersion and currentNodeVersion. Users may specify either explicit versions offered by Kubernetes Engine or version aliases, which have the following behavior: - "latest": picks the highest valid Kubernetes version - "1.X": picks the highest valid patch+gke.N patch in the 1.X version - "1.X.Y": picks the highest valid gke.N patch in the 1.X.Y version - "1.X.Y-gke.N": picks an explicit Kubernetes version - "","-": picks the default Kubernetes version |
initialNodeCount | integer (int32) | The number of nodes to create in this cluster. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota. For requests, this field should only be used in lieu of a "node_pool" object, since this configuration (along with the "node_config") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a node_pool at the same time. This field is deprecated, use node_pool.initial_node_count instead. |
instanceGroupUrls | array | Output only. Deprecated. Use node_pools.instance_group_urls. |
ipAllocationPolicy | object | Configuration for cluster IP allocation. (id: IPAllocationPolicy) |
labelFingerprint | string | The fingerprint of the set of labels for this cluster. |
legacyAbac | object | Configuration for the legacy ABAC authorization mode. (id: LegacyAbac) |
location | string | Output only. The name of the Google Compute Engine zone or region in which the cluster resides. |
locations | array | The list of Google Compute Engine zones in which the cluster's nodes should be located. This field provides a default value if NodePool.Locations are not specified during node pool creation. Warning: changing cluster locations will update the NodePool.Locations of all node pools and will result in nodes being added and/or removed. |
loggingConfig | object | Logging configuration for the cluster. (id: LoggingConfig) |
loggingService | string | The logging service the cluster should use to write logs. Currently available options: * logging.googleapis.com/kubernetes - The Cloud Logging service with a Kubernetes-native resource model * logging.googleapis.com - The legacy Cloud Logging service (no longer available as of GKE 1.15). * none - no logs will be exported from the cluster. If left as an empty string,logging.googleapis.com/kubernetes will be used for GKE 1.14+ or logging.googleapis.com for earlier versions. |
maintenancePolicy | object | Configure the maintenance policy for this cluster. (id: MaintenancePolicy) |
masterAuth | object | The authentication information for accessing the master endpoint. If unspecified, the defaults are used: For clusters before v1.12, if master_auth is unspecified, username will be set to "admin", a random password will be generated, and a client certificate will be issued. (id: MasterAuth) |
masterAuthorizedNetworksConfig | object | The configuration options for master authorized networks feature. Deprecated: Use ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config instead. (id: MasterAuthorizedNetworksConfig) |
meshCertificates | object | Configuration for issuance of mTLS keys and certificates to Kubernetes pods. (id: MeshCertificates) |
monitoringConfig | object | Monitoring configuration for the cluster. (id: MonitoringConfig) |
monitoringService | string | The monitoring service the cluster should use to write metrics. Currently available options: * monitoring.googleapis.com/kubernetes - The Cloud Monitoring service with a Kubernetes-native resource model * monitoring.googleapis.com - The legacy Cloud Monitoring service (no longer available as of GKE 1.15). * none - No metrics will be exported from the cluster. If left as an empty string,monitoring.googleapis.com/kubernetes will be used for GKE 1.14+ or monitoring.googleapis.com for earlier versions. |
network | string | The name of the Google Compute Engine network to which the cluster is connected. If left unspecified, the default network will be used. |
networkConfig | object | Configuration for cluster networking. (id: NetworkConfig) |
networkPolicy | object | Configuration options for the NetworkPolicy feature. (id: NetworkPolicy) |
nodeConfig | object | Parameters used in creating the cluster's nodes. For requests, this field should only be used in lieu of a "node_pool" object, since this configuration (along with the "initial_node_count") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a node_pool at the same time. For responses, this field will be populated with the node configuration of the first node pool. (For configuration of each node pool, see node_pool.config ) If unspecified, the defaults are used. This field is deprecated, use node_pool.config instead. (id: NodeConfig) |
nodeIpv4CidrSize | integer (int32) | Output only. The size of the address space on each node for hosting containers. This is provisioned from within the container_ipv4_cidr range. This field will only be set when cluster is in route-based network mode. |
nodePoolAutoConfig | object | Node pool configs that apply to all auto-provisioned node pools in autopilot clusters and node auto-provisioning enabled clusters. (id: NodePoolAutoConfig) |
nodePoolDefaults | object | Default NodePool settings for the entire cluster. These settings are overridden if specified on the specific NodePool object. (id: NodePoolDefaults) |
nodePools | array | The node pools associated with this cluster. This field should not be set if "node_config" or "initial_node_count" are specified. |
notificationConfig | object | Notification configuration of the cluster. (id: NotificationConfig) |
parentProductConfig | object | The configuration of the parent product of the cluster. This field is used by Google internal products that are built on top of the GKE cluster and take the ownership of the cluster. (id: ParentProductConfig) |
podAutoscaling | object | The config for pod autoscaling. (id: PodAutoscaling) |
privateClusterConfig | object | Configuration for private cluster. (id: PrivateClusterConfig) |
rbacBindingConfig | object | RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created. (id: RBACBindingConfig) |
releaseChannel | object | Release channel configuration. If left unspecified on cluster creation and a version is specified, the cluster is enrolled in the most mature release channel where the version is available (first checking STABLE, then REGULAR, and finally RAPID). Otherwise, if no release channel configuration and no version is specified, the cluster is enrolled in the REGULAR channel with its default version. (id: ReleaseChannel) |
resourceLabels | object | The resource labels for the cluster to use to annotate any related Google Compute Engine resources. |
resourceUsageExportConfig | object | Configuration for exporting resource usages. Resource usage export is disabled when this config is unspecified. (id: ResourceUsageExportConfig) |
satisfiesPzi | boolean | Output only. Reserved for future use. |
satisfiesPzs | boolean | Output only. Reserved for future use. |
secretManagerConfig | object | Secret CSI driver configuration. (id: SecretManagerConfig) |
securityPostureConfig | object | Enable/Disable Security Posture API features for the cluster. (id: SecurityPostureConfig) |
selfLink | string | Output only. Server-defined URL for the resource. |
servicesIpv4Cidr | string | Output only. The IP address range of the Kubernetes services in this cluster, in CIDR notation (e.g. 1.2.3.4/29 ). Service addresses are typically put in the last /16 from the container CIDR. |
shieldedNodes | object | Shielded Nodes configuration. (id: ShieldedNodes) |
status | string | Output only. The current status of this cluster. |
statusMessage | string | Output only. Deprecated. Use conditions instead. Additional information about the current status of this cluster, if available. |
subnetwork | string | The name of the Google Compute Engine subnetwork to which the cluster is connected. |
tpuIpv4CidrBlock | string | Output only. The IP address range of the Cloud TPUs in this cluster, in CIDR notation (e.g. 1.2.3.4/29 ). This field is deprecated due to the deprecation of 2VM TPU. The end of life date for 2VM TPU is 2025-04-25. |
userManagedKeysConfig | object | The Custom keys configuration for the cluster. (id: UserManagedKeysConfig) |
verticalPodAutoscaling | object | Cluster-level Vertical Pod Autoscaling configuration. (id: VerticalPodAutoscaling) |
workloadIdentityConfig | object | Configuration for the use of Kubernetes Service Accounts in GCP IAM policies. (id: WorkloadIdentityConfig) |
zone | string | Output only. The name of the Google Compute Engine zone in which the cluster resides. This field is deprecated, use location instead. |
Successful response
Name | Datatype | Description |
---|---|---|
clusters | array | A list of clusters in the project in the specified zone, or across all ones. |
missingZones | array | If any zones are listed here, the list of clusters returned may be missing those zones. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_clusters_get | select | projectsId , locationsId , clustersId | projectId , zone , clusterId | Gets the details of a specific cluster. |
projects_zones_clusters_get | select | projectId , zone , clusterId | name | Gets the details of a specific cluster. |
projects_locations_clusters_list | select | projectsId , locationsId | projectId , zone | Lists all clusters owned by a project in either the specified zone or all zones. |
projects_zones_clusters_list | select | projectId , zone | parent | Lists all clusters owned by a project in either the specified zone or all zones. |
projects_locations_clusters_create | insert | projectsId , locationsId | Creates a cluster, consisting of the specified number and type of Google Compute Engine instances. By default, the cluster is created in the project's default network. One firewall is added for the cluster. After cluster creation, the Kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range the cluster is using. | |
projects_zones_clusters_create | insert | projectId , zone | Creates a cluster, consisting of the specified number and type of Google Compute Engine instances. By default, the cluster is created in the project's default network. One firewall is added for the cluster. After cluster creation, the Kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range the cluster is using. | |
projects_locations_clusters_update | replace | projectsId , locationsId , clustersId | Updates the settings of a specific cluster. | |
projects_zones_clusters_update | replace | projectId , zone , clusterId | Updates the settings of a specific cluster. | |
projects_locations_clusters_delete | delete | projectsId , locationsId , clustersId | projectId , zone , clusterId | Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted. Other Google Compute Engine resources that might be in use by the cluster, such as load balancer resources, are not deleted if they weren't present when the cluster was initially created. |
projects_zones_clusters_delete | delete | projectId , zone , clusterId | name | Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted. Other Google Compute Engine resources that might be in use by the cluster, such as load balancer resources, are not deleted if they weren't present when the cluster was initially created. |
projects_locations_clusters_set_logging | exec | projectsId , locationsId , clustersId | Sets the logging service for a specific cluster. | |
projects_locations_clusters_set_monitoring | exec | projectsId , locationsId , clustersId | Sets the monitoring service for a specific cluster. | |
projects_locations_clusters_set_addons | exec | projectsId , locationsId , clustersId | Sets the addons for a specific cluster. | |
projects_locations_clusters_set_locations | exec | projectsId , locationsId , clustersId | Sets the locations for a specific cluster. Deprecated. Use projects.locations.clusters.update instead. | |
projects_locations_clusters_update_master | exec | projectsId , locationsId , clustersId | Updates the master for a specific cluster. | |
projects_locations_clusters_set_master_auth | exec | projectsId , locationsId , clustersId | Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password. | |
projects_locations_clusters_set_resource_labels | exec | projectsId , locationsId , clustersId | Sets labels on a cluster. | |
projects_locations_clusters_set_legacy_abac | exec | projectsId , locationsId , clustersId | Enables or disables the ABAC authorization mechanism on a cluster. | |
projects_locations_clusters_start_ip_rotation | exec | projectsId , locationsId , clustersId | Starts master IP rotation. | |
projects_locations_clusters_complete_ip_rotation | exec | projectsId , locationsId , clustersId | Completes master IP rotation. | |
projects_locations_clusters_set_network_policy | exec | projectsId , locationsId , clustersId | Enables or disables Network Policy for a cluster. | |
projects_locations_clusters_set_maintenance_policy | exec | projectsId , locationsId , clustersId | Sets the maintenance policy for a cluster. | |
projects_locations_clusters_check_autopilot_compatibility | exec | projectsId , locationsId , clustersId | Checks the cluster compatibility with Autopilot mode, and returns a list of compatibility issues. | |
projects_zones_clusters_logging | exec | projectId , zone , clusterId | Sets the logging service for a specific cluster. | |
projects_zones_clusters_monitoring | exec | projectId , zone , clusterId | Sets the monitoring service for a specific cluster. | |
projects_zones_clusters_addons | exec | projectId , zone , clusterId | Sets the addons for a specific cluster. | |
projects_zones_clusters_locations | exec | projectId , zone , clusterId | Sets the locations for a specific cluster. Deprecated. Use projects.locations.clusters.update instead. | |
projects_zones_clusters_master | exec | projectId , zone , clusterId | Updates the master for a specific cluster. | |
projects_zones_clusters_set_master_auth | exec | projectId , zone , clusterId | Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password. | |
projects_zones_clusters_resource_labels | exec | projectId , zone , clusterId | Sets labels on a cluster. | |
projects_zones_clusters_legacy_abac | exec | projectId , zone , clusterId | Enables or disables the ABAC authorization mechanism on a cluster. | |
projects_zones_clusters_start_ip_rotation | exec | projectId , zone , clusterId | Starts master IP rotation. | |
projects_zones_clusters_complete_ip_rotation | exec | projectId , zone , clusterId | Completes master IP rotation. | |
projects_zones_clusters_set_network_policy | exec | projectId , zone , clusterId | Enables or disables Network Policy for a cluster. | |
projects_zones_clusters_set_maintenance_policy | exec | projectId , zone , clusterId | Sets the maintenance policy for a cluster. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
clusterId | string | |
clustersId | string | |
locationsId | string | |
projectId | string | |
projectsId | string | |
zone | string | |
clusterId | string | |
name | string | |
parent | string | |
projectId | string | |
zone | string |
SELECT
examples
- projects_locations_clusters_get
- projects_zones_clusters_get
- projects_locations_clusters_list
- projects_zones_clusters_list
Gets the details of a specific cluster.
SELECT
id,
name,
addonsConfig,
alphaClusterFeatureGates,
anonymousAuthenticationConfig,
authenticatorGroupsConfig,
autopilot,
autoscaling,
binaryAuthorization,
clusterIpv4Cidr,
compliancePostureConfig,
conditions,
confidentialNodes,
controlPlaneEndpointsConfig,
costManagementConfig,
createTime,
currentMasterVersion,
currentNodeCount,
currentNodeVersion,
databaseEncryption,
defaultMaxPodsConstraint,
description,
enableK8sBetaApis,
enableKubernetesAlpha,
enableTpu,
endpoint,
enterpriseConfig,
etag,
expireTime,
fleet,
gkeAutoUpgradeConfig,
identityServiceConfig,
initialClusterVersion,
initialNodeCount,
instanceGroupUrls,
ipAllocationPolicy,
labelFingerprint,
legacyAbac,
location,
locations,
loggingConfig,
loggingService,
maintenancePolicy,
masterAuth,
masterAuthorizedNetworksConfig,
meshCertificates,
monitoringConfig,
monitoringService,
network,
networkConfig,
networkPolicy,
nodeConfig,
nodeIpv4CidrSize,
nodePoolAutoConfig,
nodePoolDefaults,
nodePools,
notificationConfig,
parentProductConfig,
podAutoscaling,
privateClusterConfig,
rbacBindingConfig,
releaseChannel,
resourceLabels,
resourceUsageExportConfig,
satisfiesPzi,
satisfiesPzs,
secretManagerConfig,
securityPostureConfig,
selfLink,
servicesIpv4Cidr,
shieldedNodes,
status,
statusMessage,
subnetwork,
tpuIpv4CidrBlock,
userManagedKeysConfig,
verticalPodAutoscaling,
workloadIdentityConfig,
zone
FROM google.container.clusters
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND clustersId = '{{ clustersId }}' -- required
AND projectId = '{{ projectId }}'
AND zone = '{{ zone }}'
AND clusterId = '{{ clusterId }}';
Gets the details of a specific cluster.
SELECT
id,
name,
addonsConfig,
alphaClusterFeatureGates,
anonymousAuthenticationConfig,
authenticatorGroupsConfig,
autopilot,
autoscaling,
binaryAuthorization,
clusterIpv4Cidr,
compliancePostureConfig,
conditions,
confidentialNodes,
controlPlaneEndpointsConfig,
costManagementConfig,
createTime,
currentMasterVersion,
currentNodeCount,
currentNodeVersion,
databaseEncryption,
defaultMaxPodsConstraint,
description,
enableK8sBetaApis,
enableKubernetesAlpha,
enableTpu,
endpoint,
enterpriseConfig,
etag,
expireTime,
fleet,
gkeAutoUpgradeConfig,
identityServiceConfig,
initialClusterVersion,
initialNodeCount,
instanceGroupUrls,
ipAllocationPolicy,
labelFingerprint,
legacyAbac,
location,
locations,
loggingConfig,
loggingService,
maintenancePolicy,
masterAuth,
masterAuthorizedNetworksConfig,
meshCertificates,
monitoringConfig,
monitoringService,
network,
networkConfig,
networkPolicy,
nodeConfig,
nodeIpv4CidrSize,
nodePoolAutoConfig,
nodePoolDefaults,
nodePools,
notificationConfig,
parentProductConfig,
podAutoscaling,
privateClusterConfig,
rbacBindingConfig,
releaseChannel,
resourceLabels,
resourceUsageExportConfig,
satisfiesPzi,
satisfiesPzs,
secretManagerConfig,
securityPostureConfig,
selfLink,
servicesIpv4Cidr,
shieldedNodes,
status,
statusMessage,
subnetwork,
tpuIpv4CidrBlock,
userManagedKeysConfig,
verticalPodAutoscaling,
workloadIdentityConfig,
zone
FROM google.container.clusters
WHERE projectId = '{{ projectId }}' -- required
AND zone = '{{ zone }}' -- required
AND clusterId = '{{ clusterId }}' -- required
AND name = '{{ name }}';
Lists all clusters owned by a project in either the specified zone or all zones.
SELECT
id,
name,
addonsConfig,
alphaClusterFeatureGates,
anonymousAuthenticationConfig,
authenticatorGroupsConfig,
autopilot,
autoscaling,
binaryAuthorization,
clusterIpv4Cidr,
compliancePostureConfig,
conditions,
confidentialNodes,
controlPlaneEndpointsConfig,
costManagementConfig,
createTime,
currentMasterVersion,
currentNodeCount,
currentNodeVersion,
databaseEncryption,
defaultMaxPodsConstraint,
description,
enableK8sBetaApis,
enableKubernetesAlpha,
enableTpu,
endpoint,
enterpriseConfig,
etag,
expireTime,
fleet,
gkeAutoUpgradeConfig,
identityServiceConfig,
initialClusterVersion,
initialNodeCount,
instanceGroupUrls,
ipAllocationPolicy,
labelFingerprint,
legacyAbac,
location,
locations,
loggingConfig,
loggingService,
maintenancePolicy,
masterAuth,
masterAuthorizedNetworksConfig,
meshCertificates,
monitoringConfig,
monitoringService,
network,
networkConfig,
networkPolicy,
nodeConfig,
nodeIpv4CidrSize,
nodePoolAutoConfig,
nodePoolDefaults,
nodePools,
notificationConfig,
parentProductConfig,
podAutoscaling,
privateClusterConfig,
rbacBindingConfig,
releaseChannel,
resourceLabels,
resourceUsageExportConfig,
satisfiesPzi,
satisfiesPzs,
secretManagerConfig,
securityPostureConfig,
selfLink,
servicesIpv4Cidr,
shieldedNodes,
status,
statusMessage,
subnetwork,
tpuIpv4CidrBlock,
userManagedKeysConfig,
verticalPodAutoscaling,
workloadIdentityConfig,
zone
FROM google.container.clusters
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND projectId = '{{ projectId }}'
AND zone = '{{ zone }}';
Lists all clusters owned by a project in either the specified zone or all zones.
SELECT
clusters,
missingZones
FROM google.container.clusters
WHERE projectId = '{{ projectId }}' -- required
AND zone = '{{ zone }}' -- required
AND parent = '{{ parent }}';
INSERT
examples
- projects_locations_clusters_create
- projects_zones_clusters_create
- Manifest
Creates a cluster, consisting of the specified number and type of Google Compute Engine instances. By default, the cluster is created in the project's default network. One firewall is added for the cluster. After cluster creation, the Kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range the cluster is using.
INSERT INTO google.container.clusters (
data__projectId,
data__zone,
data__cluster,
data__parent,
projectsId,
locationsId
)
SELECT
'{{ projectId }}',
'{{ zone }}',
'{{ cluster }}',
'{{ parent }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
clusterConditions,
detail,
endTime,
error,
location,
nodepoolConditions,
operationType,
progress,
selfLink,
startTime,
status,
statusMessage,
targetLink,
zone
;
Creates a cluster, consisting of the specified number and type of Google Compute Engine instances. By default, the cluster is created in the project's default network. One firewall is added for the cluster. After cluster creation, the Kubelet creates routes for each node to allow the containers on that node to communicate with all other instances in the cluster. Finally, an entry is added to the project's global metadata indicating which CIDR range the cluster is using.
INSERT INTO google.container.clusters (
data__projectId,
data__zone,
data__cluster,
data__parent,
projectId,
zone
)
SELECT
'{{ projectId }}',
'{{ zone }}',
'{{ cluster }}',
'{{ parent }}',
'{{ projectId }}',
'{{ zone }}'
RETURNING
name,
clusterConditions,
detail,
endTime,
error,
location,
nodepoolConditions,
operationType,
progress,
selfLink,
startTime,
status,
statusMessage,
targetLink,
zone
;
# Description fields are for documentation purposes
- name: clusters
props:
- name: projectsId
value: string
description: Required parameter for the clusters resource.
- name: locationsId
value: string
description: Required parameter for the clusters resource.
- name: projectId
value: string
description: Required parameter for the clusters resource.
- name: zone
value: string
description: Required parameter for the clusters resource.
- name: projectId
value: string
description: >
Deprecated. The Google Developers Console [project ID or project number](https://{$universe.dns_names.final_documentation_domain}/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the parent field.
- name: zone
value: string
description: >
Deprecated. The name of the Google Compute Engine [zone](https://{$universe.dns_names.final_documentation_domain}/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the parent field.
- name: cluster
value: object
description: >
A Google Kubernetes Engine cluster.
- name: parent
value: string
description: >
The parent (project and location) where the cluster will be created. Specified in the format `projects/*/locations/*`.
REPLACE
examples
- projects_locations_clusters_update
- projects_zones_clusters_update
Updates the settings of a specific cluster.
REPLACE google.container.clusters
SET
data__projectId = '{{ projectId }}',
data__zone = '{{ zone }}',
data__clusterId = '{{ clusterId }}',
data__update = '{{ update }}',
data__name = '{{ name }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND clustersId = '{{ clustersId }}' --required
RETURNING
name,
clusterConditions,
detail,
endTime,
error,
location,
nodepoolConditions,
operationType,
progress,
selfLink,
startTime,
status,
statusMessage,
targetLink,
zone;
Updates the settings of a specific cluster.
REPLACE google.container.clusters
SET
data__projectId = '{{ projectId }}',
data__zone = '{{ zone }}',
data__clusterId = '{{ clusterId }}',
data__update = '{{ update }}',
data__name = '{{ name }}'
WHERE
projectId = '{{ projectId }}' --required
AND zone = '{{ zone }}' --required
AND clusterId = '{{ clusterId }}' --required
RETURNING
name,
clusterConditions,
detail,
endTime,
error,
location,
nodepoolConditions,
operationType,
progress,
selfLink,
startTime,
status,
statusMessage,
targetLink,
zone;
DELETE
examples
- projects_locations_clusters_delete
- projects_zones_clusters_delete
Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted. Other Google Compute Engine resources that might be in use by the cluster, such as load balancer resources, are not deleted if they weren't present when the cluster was initially created.
DELETE FROM google.container.clusters
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND clustersId = '{{ clustersId }}' --required
AND projectId = '{{ projectId }}'
AND zone = '{{ zone }}'
AND clusterId = '{{ clusterId }}';
Deletes the cluster, including the Kubernetes endpoint and all worker nodes. Firewalls and routes that were configured during cluster creation are also deleted. Other Google Compute Engine resources that might be in use by the cluster, such as load balancer resources, are not deleted if they weren't present when the cluster was initially created.
DELETE FROM google.container.clusters
WHERE projectId = '{{ projectId }}' --required
AND zone = '{{ zone }}' --required
AND clusterId = '{{ clusterId }}' --required
AND name = '{{ name }}';
Lifecycle Methods
- projects_locations_clusters_set_logging
- projects_locations_clusters_set_monitoring
- projects_locations_clusters_set_addons
- projects_locations_clusters_set_locations
- projects_locations_clusters_update_master
- projects_locations_clusters_set_master_auth
- projects_locations_clusters_set_resource_labels
- projects_locations_clusters_set_legacy_abac
- projects_locations_clusters_start_ip_rotation
- projects_locations_clusters_complete_ip_rotation
- projects_locations_clusters_set_network_policy
- projects_locations_clusters_set_maintenance_policy
- projects_locations_clusters_check_autopilot_compatibility
- projects_zones_clusters_logging
- projects_zones_clusters_monitoring
- projects_zones_clusters_addons
- projects_zones_clusters_locations
- projects_zones_clusters_master
- projects_zones_clusters_set_master_auth
- projects_zones_clusters_resource_labels
- projects_zones_clusters_legacy_abac
- projects_zones_clusters_start_ip_rotation
- projects_zones_clusters_complete_ip_rotation
- projects_zones_clusters_set_network_policy
- projects_zones_clusters_set_maintenance_policy
Sets the logging service for a specific cluster.
EXEC google.container.clusters.projects_locations_clusters_set_logging
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@clustersId='{{ clustersId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"loggingService": "{{ loggingService }}",
"name": "{{ name }}"
}';
Sets the monitoring service for a specific cluster.
EXEC google.container.clusters.projects_locations_clusters_set_monitoring
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@clustersId='{{ clustersId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"monitoringService": "{{ monitoringService }}",
"name": "{{ name }}"
}';
Sets the addons for a specific cluster.
EXEC google.container.clusters.projects_locations_clusters_set_addons
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@clustersId='{{ clustersId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"addonsConfig": "{{ addonsConfig }}",
"name": "{{ name }}"
}';
Sets the locations for a specific cluster. Deprecated. Use projects.locations.clusters.update instead.
EXEC google.container.clusters.projects_locations_clusters_set_locations
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@clustersId='{{ clustersId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"locations": "{{ locations }}",
"name": "{{ name }}"
}';
Updates the master for a specific cluster.
EXEC google.container.clusters.projects_locations_clusters_update_master
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@clustersId='{{ clustersId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"masterVersion": "{{ masterVersion }}",
"name": "{{ name }}"
}';
Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password.
EXEC google.container.clusters.projects_locations_clusters_set_master_auth
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@clustersId='{{ clustersId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"action": "{{ action }}",
"update": "{{ update }}",
"name": "{{ name }}"
}';
Sets labels on a cluster.
EXEC google.container.clusters.projects_locations_clusters_set_resource_labels
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@clustersId='{{ clustersId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"resourceLabels": "{{ resourceLabels }}",
"labelFingerprint": "{{ labelFingerprint }}",
"name": "{{ name }}"
}';
Enables or disables the ABAC authorization mechanism on a cluster.
EXEC google.container.clusters.projects_locations_clusters_set_legacy_abac
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@clustersId='{{ clustersId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"enabled": {{ enabled }},
"name": "{{ name }}"
}';
Starts master IP rotation.
EXEC google.container.clusters.projects_locations_clusters_start_ip_rotation
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@clustersId='{{ clustersId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"name": "{{ name }}",
"rotateCredentials": {{ rotateCredentials }}
}';
Completes master IP rotation.
EXEC google.container.clusters.projects_locations_clusters_complete_ip_rotation
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@clustersId='{{ clustersId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"name": "{{ name }}"
}';
Enables or disables Network Policy for a cluster.
EXEC google.container.clusters.projects_locations_clusters_set_network_policy
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@clustersId='{{ clustersId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"networkPolicy": "{{ networkPolicy }}",
"name": "{{ name }}"
}';
Sets the maintenance policy for a cluster.
EXEC google.container.clusters.projects_locations_clusters_set_maintenance_policy
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@clustersId='{{ clustersId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"maintenancePolicy": "{{ maintenancePolicy }}",
"name": "{{ name }}"
}';
Checks the cluster compatibility with Autopilot mode, and returns a list of compatibility issues.
EXEC google.container.clusters.projects_locations_clusters_check_autopilot_compatibility
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@clustersId='{{ clustersId }}' --required;
Sets the logging service for a specific cluster.
EXEC google.container.clusters.projects_zones_clusters_logging
@projectId='{{ projectId }}' --required,
@zone='{{ zone }}' --required,
@clusterId='{{ clusterId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"loggingService": "{{ loggingService }}",
"name": "{{ name }}"
}';
Sets the monitoring service for a specific cluster.
EXEC google.container.clusters.projects_zones_clusters_monitoring
@projectId='{{ projectId }}' --required,
@zone='{{ zone }}' --required,
@clusterId='{{ clusterId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"monitoringService": "{{ monitoringService }}",
"name": "{{ name }}"
}';
Sets the addons for a specific cluster.
EXEC google.container.clusters.projects_zones_clusters_addons
@projectId='{{ projectId }}' --required,
@zone='{{ zone }}' --required,
@clusterId='{{ clusterId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"addonsConfig": "{{ addonsConfig }}",
"name": "{{ name }}"
}';
Sets the locations for a specific cluster. Deprecated. Use projects.locations.clusters.update instead.
EXEC google.container.clusters.projects_zones_clusters_locations
@projectId='{{ projectId }}' --required,
@zone='{{ zone }}' --required,
@clusterId='{{ clusterId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"locations": "{{ locations }}",
"name": "{{ name }}"
}';
Updates the master for a specific cluster.
EXEC google.container.clusters.projects_zones_clusters_master
@projectId='{{ projectId }}' --required,
@zone='{{ zone }}' --required,
@clusterId='{{ clusterId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"masterVersion": "{{ masterVersion }}",
"name": "{{ name }}"
}';
Sets master auth materials. Currently supports changing the admin password or a specific cluster, either via password generation or explicitly setting the password.
EXEC google.container.clusters.projects_zones_clusters_set_master_auth
@projectId='{{ projectId }}' --required,
@zone='{{ zone }}' --required,
@clusterId='{{ clusterId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"action": "{{ action }}",
"update": "{{ update }}",
"name": "{{ name }}"
}';
Sets labels on a cluster.
EXEC google.container.clusters.projects_zones_clusters_resource_labels
@projectId='{{ projectId }}' --required,
@zone='{{ zone }}' --required,
@clusterId='{{ clusterId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"resourceLabels": "{{ resourceLabels }}",
"labelFingerprint": "{{ labelFingerprint }}",
"name": "{{ name }}"
}';
Enables or disables the ABAC authorization mechanism on a cluster.
EXEC google.container.clusters.projects_zones_clusters_legacy_abac
@projectId='{{ projectId }}' --required,
@zone='{{ zone }}' --required,
@clusterId='{{ clusterId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"enabled": {{ enabled }},
"name": "{{ name }}"
}';
Starts master IP rotation.
EXEC google.container.clusters.projects_zones_clusters_start_ip_rotation
@projectId='{{ projectId }}' --required,
@zone='{{ zone }}' --required,
@clusterId='{{ clusterId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"name": "{{ name }}",
"rotateCredentials": {{ rotateCredentials }}
}';
Completes master IP rotation.
EXEC google.container.clusters.projects_zones_clusters_complete_ip_rotation
@projectId='{{ projectId }}' --required,
@zone='{{ zone }}' --required,
@clusterId='{{ clusterId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"name": "{{ name }}"
}';
Enables or disables Network Policy for a cluster.
EXEC google.container.clusters.projects_zones_clusters_set_network_policy
@projectId='{{ projectId }}' --required,
@zone='{{ zone }}' --required,
@clusterId='{{ clusterId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"networkPolicy": "{{ networkPolicy }}",
"name": "{{ name }}"
}';
Sets the maintenance policy for a cluster.
EXEC google.container.clusters.projects_zones_clusters_set_maintenance_policy
@projectId='{{ projectId }}' --required,
@zone='{{ zone }}' --required,
@clusterId='{{ clusterId }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"zone": "{{ zone }}",
"clusterId": "{{ clusterId }}",
"maintenancePolicy": "{{ maintenancePolicy }}",
"name": "{{ name }}"
}';