Method: projects.locations.clusters.create

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.

HTTP request

POST https://container.googleapis.com/v1beta1/{parent=projects/*/locations/*}/clusters

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

The parent (project and location) where the cluster will be created. Specified in the format projects/*/locations/*.

Authorization requires the following IAM permission on the specified resource parent:

  • container.clusters.create

Request body

The request body contains data with the following structure:

JSON representation
{
  "projectId": string,
  "zone": string,
  "cluster": {
    object (Cluster)
  }
}
Fields
projectId
(deprecated)

string

Required. Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the parent field.

zone
(deprecated)

string

Required. Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the parent field.

cluster

object (Cluster)

Required. A cluster resource

Response body

If successful, the response body contains a newly created instance of Operation.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.