Skip to main content

Create Kubernetes Cluster

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.

External Documentation

To learn more, visit the GCP documentation.

Basic Parameters

ParameterDescription
NameThe 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.
Node PoolsThe node pools associated with this cluster, as a array of JSON objects.

For information on how to format this field, view the GCP documentation

This field should not be set if "node_config" or "initial_node_count" are specified.
Project IDThe Google Developers Console project ID or project number.
ZoneThe name of the Google Compute Engine zone in which the cluster should reside.

Advanced Parameters

ParameterDescription
Add-ons ConfigurationConfiguration for the addons that can be automatically spun up in the cluster, enabling additional functionality.

For information on how to format this object, view https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters#Cluster.AddonsConfig
Authenticator Security GroupThe name of the security group-of-groups to be used.
AutopilotEnable Autopilot.
Autoscaling ConfigurationCluster-level autoscaling configuration.

View https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters#Cluster.ClusterAutoscaling for how to format this object.
Binary AuthorizationEnable Binary Authorization for this cluster. If enabled, all container images will be validated by Binary Authorization.
CIDR Blockscidr_blocks define up to 50 external networks that could access Kubernetes master through HTTPS.
ConditionsWhich conditions caused the current cluster state.
Confidential NodesWhether Confidential Nodes feature is enabled for all nodes in this cluster.
Database Encryption Key NameName of CloudKMS key to use for the encryption of secrets in etcd. Ex. projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key.
Database Encryption StateDenotes the state of etcd encryption.
DescriptionAn optional description of this cluster.
Enable TPUEnable the ability to use Cloud TPUs in this cluster.
IP Allocation PolicyConfiguration for cluster IP allocation.

View https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters#Cluster.IPAllocationPolicy for how to format this object.
IPv4 CIDRThe 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.
Initial Cluster VersionThe 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.
Issue Client CertificateIssue a client certificate.
Label FingerprintThe fingerprint of the set of labels for this cluster.
Legacy ABACWhether the ABAC authorizer is enabled for this cluster. When enabled, identities in the system, including service accounts, nodes, and controllers, will have statically granted permissions beyond those provided by the RBAC configuration or IAM.
LocationsThe 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.
Logging ComponentsSelect components to collect logs. An empty set would disable all logging.
Logging ServiceThe 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.
Maintenance PolicyConfigure the maintenance policy for this cluster.

View https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters#Cluster.MaintenancePolicy for how to format the object.
Master Authorized NetworksWhether or not master authorized networks is enabled.
Max Pods Per NodeConstraint enforced on the max num of pods per node.
Monitoring ComponentsSelect components to collect metrics. An empty set would disable all monitoring.
Monitoring ServiceThe 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 ConfigurationNetworkConfig reports the relative names of network & subnetwork.

Visit https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters#Cluster.NetworkConfig for how to format this object.
Network Policy ProviderThe selected network policy provider.
Private Cluster ConfigurationConfiguration for private cluster.

View https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters#Cluster.PrivateClusterConfig for how to format the object.
Pub/Sub TopicThe desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}.
Release ChannelSpecifies which release channel the cluster is subscribed to.
Resource LabelsThe resource labels for the cluster to use to annotate any related Google Compute Engine resources.
Resource Usage Export ConfigurationConfiguration for exporting cluster resource usages.

View https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters#Cluster.ResourceUsageExportConfig
Shielded NodesWhether Shielded Nodes features are enabled on all nodes in this cluster.
SubnetworkThe name of the Google Compute Engine subnetwork to which the cluster is connected.
Vertical Pod AutoscalingEnables vertical pod autoscaling.
Workload PoolThe workload pool to attach all Kubernetes service accounts to.

Example Output

{
"name": "operation-1674392048992-d0986f83",
"zone": "europe-central2-a",
"operationType": "CREATE_CLUSTER",
"status": "RUNNING",
"selfLink": "https://container.googleapis.com/v1/projects/123456789/zones/europe-central2-a/operations/operation-1674392048992-d0986f83",
"targetLink": "https://container.googleapis.com/v1/projects/123456789/zones/europe-central2-a/clusters/test",
"startTime": "2023-01-22T12:54:08.992901505Z"
}

Workflow Library Example

Create Kubernetes Cluster with Gcp and Send Results Via Email

Workflow LibraryPreview this Workflow on desktop