Managed Services for Kubernetes API, gRPC: ClusterService.Create
- gRPC request
- CreateClusterRequest
- MasterSpec
- ZonalMasterSpec
- InternalAddressSpec
- ExternalAddressSpec
- RegionalMasterSpec
- MasterLocation
- LocationSpec
- MasterMaintenancePolicy
- MaintenanceWindow
- AnytimeMaintenanceWindow
- DailyMaintenanceWindow
- WeeklyMaintenanceWindow
- DaysOfWeekMaintenanceWindow
- MasterLogging
- IPAllocationPolicy
- NetworkPolicy
- KMSProvider
- Cilium
- operation.Operation
- CreateClusterMetadata
- Cluster
- Master
- ZonalMaster
- RegionalMaster
- Location
- MasterEndpoints
- MasterAuth
- VersionInfo
- MasterMaintenancePolicy
- MaintenanceWindow
- AnytimeMaintenanceWindow
- DailyMaintenanceWindow
- WeeklyMaintenanceWindow
- DaysOfWeekMaintenanceWindow
- MasterLogging
- IPAllocationPolicy
- NetworkPolicy
- KMSProvider
- Cilium
Creates a Kubernetes cluster in the specified folder.
gRPC request
rpc Create (CreateClusterRequest) returns (operation.Operation)
CreateClusterRequest
{
"folder_id": "string",
"name": "string",
"description": "string",
"labels": "map<string, string>",
"network_id": "string",
"master_spec": {
// Includes only one of the fields `zonal_master_spec`, `regional_master_spec`
"zonal_master_spec": {
"zone_id": "string",
"internal_v4_address_spec": {
"subnet_id": "string"
},
"external_v4_address_spec": {
"address": "string"
}
},
"regional_master_spec": {
"region_id": "string",
"locations": [
{
"zone_id": "string",
"internal_v4_address_spec": {
"subnet_id": "string"
}
}
],
"external_v4_address_spec": {
"address": "string"
},
"external_v6_address_spec": {
"address": "string"
}
},
// end of the list of possible fields
"locations": [
{
"zone_id": "string",
"subnet_id": "string"
}
],
"etcd_cluster_size": "int64",
"external_v4_address_spec": {
"address": "string"
},
"external_v6_address_spec": {
"address": "string"
},
"version": "string",
"maintenance_policy": {
"auto_upgrade": "bool",
"maintenance_window": {
// Includes only one of the fields `anytime`, `daily_maintenance_window`, `weekly_maintenance_window`
"anytime": "AnytimeMaintenanceWindow",
"daily_maintenance_window": {
"start_time": "google.type.TimeOfDay",
"duration": "google.protobuf.Duration"
},
"weekly_maintenance_window": {
"days_of_week": [
{
"days": [
"DayOfWeek"
],
"start_time": "google.type.TimeOfDay",
"duration": "google.protobuf.Duration"
}
]
}
// end of the list of possible fields
}
},
"security_group_ids": [
"string"
],
"master_logging": {
"enabled": "bool",
// Includes only one of the fields `log_group_id`, `folder_id`
"log_group_id": "string",
"folder_id": "string",
// end of the list of possible fields
"audit_enabled": "bool",
"cluster_autoscaler_enabled": "bool",
"kube_apiserver_enabled": "bool",
"events_enabled": "bool"
}
},
"ip_allocation_policy": {
"cluster_ipv4_cidr_block": "string",
"node_ipv4_cidr_mask_size": "int64",
"service_ipv4_cidr_block": "string",
"cluster_ipv6_cidr_block": "string",
"service_ipv6_cidr_block": "string"
},
// Includes only one of the fields `gateway_ipv4_address`
"gateway_ipv4_address": "string",
// end of the list of possible fields
"service_account_id": "string",
"node_service_account_id": "string",
"release_channel": "ReleaseChannel",
"network_policy": {
"provider": "Provider"
},
"kms_provider": {
"key_id": "string"
},
// Includes only one of the fields `cilium`
"cilium": {
"routing_mode": "RoutingMode"
}
// end of the list of possible fields
}
Field |
Description |
folder_id |
string Required field. ID of the folder to create a Kubernetes cluster in. |
name |
string Name of the Kubernetes cluster. |
description |
string Description of the Kubernetes cluster. |
labels |
object (map<string, string>) Resource labels as |
network_id |
string Required field. ID of the network. |
master_spec |
Required field. Master specification of the Kubernetes cluster. |
ip_allocation_policy |
IP allocation policy of the Kubernetes cluster. |
gateway_ipv4_address |
string Gateway IPv4 address. Includes only one of the fields |
service_account_id |
string Required field. Service account to be used for provisioning Compute Cloud and VPC resources for Kubernetes cluster. |
node_service_account_id |
string Required field. Service account to be used by the worker nodes of the Kubernetes cluster to access Container Registry or to push node logs and metrics. |
release_channel |
enum ReleaseChannel Release channel for the master.
|
network_policy |
|
kms_provider |
KMS provider configuration. |
cilium |
Includes only one of the fields |
MasterSpec
Field |
Description |
zonal_master_spec |
Specification of the zonal master. Includes only one of the fields |
regional_master_spec |
Specification of the regional master. Includes only one of the fields |
locations[] |
Locations specification for Kubernetes control-plane (master) instances.
|
etcd_cluster_size |
int64 Number of etcd nodes in cluster. |
external_v4_address_spec |
Specification of parameters for external IPv4 networking. |
external_v6_address_spec |
Specification of parameters for external IPv6 networking. |
version |
string Version of Kubernetes components that runs on the master. |
maintenance_policy |
Maintenance policy of the master. |
security_group_ids[] |
string Master security groups. |
master_logging |
Cloud Logging for master components. |
ZonalMasterSpec
Field |
Description |
zone_id |
string Required field. ID of the availability zone. |
internal_v4_address_spec |
Specification of parameters for internal IPv4 networking. |
external_v4_address_spec |
Specification of parameters for external IPv4 networking. |
InternalAddressSpec
Field |
Description |
subnet_id |
string ID of the subnet. If no ID is specified, and there only one subnet in specified zone, an address in this subnet will be allocated. |
ExternalAddressSpec
Field |
Description |
address |
string IP address. |
RegionalMasterSpec
Field |
Description |
region_id |
string Required field. ID of the availability zone where the master resides. |
locations[] |
List of locations where the master will be allocated. |
external_v4_address_spec |
Specify to allocate a static public IP for the master. |
external_v6_address_spec |
Specification of parameters for external IPv6 networking. |
MasterLocation
Field |
Description |
zone_id |
string Required field. ID of the availability zone. |
internal_v4_address_spec |
If not specified and there is a single subnet in specified zone, address |
LocationSpec
Field |
Description |
zone_id |
string Required field. ID of the availability zone where the master resides. |
subnet_id |
string ID of the VPC network's subnet where the master resides. |
MasterMaintenancePolicy
Field |
Description |
auto_upgrade |
bool If set to true, automatic updates are installed in the specified period of time with no interaction from the user. |
maintenance_window |
Maintenance window settings. Update will start at the specified time and last no more than the specified duration. |
MaintenanceWindow
Field |
Description |
anytime |
Updating the master at any time. Includes only one of the fields Maintenance policy. |
daily_maintenance_window |
Updating the master on any day during the specified time window. Includes only one of the fields Maintenance policy. |
weekly_maintenance_window |
Updating the master on selected days during the specified time window. Includes only one of the fields Maintenance policy. |
AnytimeMaintenanceWindow
Field |
Description |
Empty |
DailyMaintenanceWindow
Field |
Description |
start_time |
Required field. Window start time, in the UTC timezone. |
duration |
Window duration. |
WeeklyMaintenanceWindow
Field |
Description |
days_of_week[] |
Days of the week and the maintenance window for these days when automatic updates are allowed. |
DaysOfWeekMaintenanceWindow
Field |
Description |
days[] |
enum DayOfWeek Days of the week when automatic updates are allowed.
|
start_time |
Required field. Window start time, in the UTC timezone. |
duration |
Window duration. |
MasterLogging
Field |
Description |
enabled |
bool Identifies whether Cloud Logging is enabled for master components. |
log_group_id |
string ID of the log group where logs of master components should be stored. Includes only one of the fields The destination of master components' logs. |
folder_id |
string ID of the folder where logs should be stored (in default group). Includes only one of the fields The destination of master components' logs. |
audit_enabled |
bool Identifies whether Cloud Logging is enabled for audit logs. |
cluster_autoscaler_enabled |
bool Identifies whether Cloud Logging is enabled for cluster-autoscaler. |
kube_apiserver_enabled |
bool Identifies whether Cloud Logging is enabled for kube-apiserver. |
events_enabled |
bool Identifies whether Cloud Logging is enabled for events. |
IPAllocationPolicy
Field |
Description |
cluster_ipv4_cidr_block |
string CIDR block. IP range for allocating pod addresses. It should not overlap with any subnet in the network the Kubernetes cluster located in. Static routes will be |
node_ipv4_cidr_mask_size |
int64 Size of the masks that are assigned for each node in the cluster. If not specified, 24 is used. |
service_ipv4_cidr_block |
string CIDR block. IP range Kubernetes service Kubernetes cluster IP addresses will be allocated from. It should not overlap with any subnet in the network the Kubernetes cluster located in. |
cluster_ipv6_cidr_block |
string IPv6 range for allocating pod IP addresses. |
service_ipv6_cidr_block |
string IPv6 range for allocating Kubernetes service IP addresses |
NetworkPolicy
Field |
Description |
provider |
enum Provider
|
KMSProvider
Field |
Description |
key_id |
string KMS key ID for secrets encryption. |
Cilium
Field |
Description |
routing_mode |
enum RoutingMode
|
operation.Operation
{
"id": "string",
"description": "string",
"created_at": "google.protobuf.Timestamp",
"created_by": "string",
"modified_at": "google.protobuf.Timestamp",
"done": "bool",
"metadata": {
"cluster_id": "string"
},
// Includes only one of the fields `error`, `response`
"error": "google.rpc.Status",
"response": {
"id": "string",
"folder_id": "string",
"created_at": "google.protobuf.Timestamp",
"name": "string",
"description": "string",
"labels": "map<string, string>",
"status": "Status",
"health": "Health",
"network_id": "string",
"master": {
// Includes only one of the fields `zonal_master`, `regional_master`
"zonal_master": {
"zone_id": "string",
"internal_v4_address": "string",
"external_v4_address": "string"
},
"regional_master": {
"region_id": "string",
"internal_v4_address": "string",
"external_v4_address": "string",
"external_v6_address": "string"
},
// end of the list of possible fields
"locations": [
{
"zone_id": "string",
"subnet_id": "string"
}
],
"etcd_cluster_size": "int64",
"version": "string",
"endpoints": {
"internal_v4_endpoint": "string",
"external_v4_endpoint": "string",
"external_v6_endpoint": "string"
},
"master_auth": {
"cluster_ca_certificate": "string"
},
"version_info": {
"current_version": "string",
"new_revision_available": "bool",
"new_revision_summary": "string",
"version_deprecated": "bool"
},
"maintenance_policy": {
"auto_upgrade": "bool",
"maintenance_window": {
// Includes only one of the fields `anytime`, `daily_maintenance_window`, `weekly_maintenance_window`
"anytime": "AnytimeMaintenanceWindow",
"daily_maintenance_window": {
"start_time": "google.type.TimeOfDay",
"duration": "google.protobuf.Duration"
},
"weekly_maintenance_window": {
"days_of_week": [
{
"days": [
"DayOfWeek"
],
"start_time": "google.type.TimeOfDay",
"duration": "google.protobuf.Duration"
}
]
}
// end of the list of possible fields
}
},
"security_group_ids": [
"string"
],
"master_logging": {
"enabled": "bool",
// Includes only one of the fields `log_group_id`, `folder_id`
"log_group_id": "string",
"folder_id": "string",
// end of the list of possible fields
"audit_enabled": "bool",
"cluster_autoscaler_enabled": "bool",
"kube_apiserver_enabled": "bool",
"events_enabled": "bool"
}
},
"ip_allocation_policy": {
"cluster_ipv4_cidr_block": "string",
"node_ipv4_cidr_mask_size": "int64",
"service_ipv4_cidr_block": "string",
"cluster_ipv6_cidr_block": "string",
"service_ipv6_cidr_block": "string"
},
// Includes only one of the fields `gateway_ipv4_address`
"gateway_ipv4_address": "string",
// end of the list of possible fields
"service_account_id": "string",
"node_service_account_id": "string",
"release_channel": "ReleaseChannel",
"network_policy": {
"provider": "Provider"
},
"kms_provider": {
"key_id": "string"
},
"log_group_id": "string",
// Includes only one of the fields `cilium`
"cilium": {
"routing_mode": "RoutingMode"
}
// end of the list of possible fields
}
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
Field |
Description |
id |
string ID of the operation. |
description |
string Description of the operation. 0-256 characters long. |
created_at |
Creation timestamp. |
created_by |
string ID of the user or service account who initiated the operation. |
modified_at |
The time when the Operation resource was last modified. |
done |
bool If the value is |
metadata |
Service-specific metadata associated with the operation. |
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |
CreateClusterMetadata
Field |
Description |
cluster_id |
string ID of the Kubernetes cluster that is being created. |
Cluster
A Kubernetes cluster.
Field |
Description |
id |
string ID of the Kubernetes cluster. |
folder_id |
string ID of the folder that the Kubernetes cluster belongs to. |
created_at |
Creation timestamp. |
name |
string Name of the Kubernetes cluster. |
description |
string Description of the Kubernetes cluster. 0-256 characters long. |
labels |
object (map<string, string>) Resource labels as |
status |
enum Status Status of the Kubernetes cluster.
|
health |
enum Health Health of the Kubernetes cluster.
|
network_id |
string ID of the network the Kubernetes cluster belongs to. |
master |
Properties of the master for the Kubernetes cluster. |
ip_allocation_policy |
Allocation policy for IP addresses of services and pods inside the Kubernetes cluster in different availability zones. |
gateway_ipv4_address |
string Gateway IPv4 address. Includes only one of the fields |
service_account_id |
string Service account to be used for provisioning Compute Cloud and VPC resources for Kubernetes cluster. |
node_service_account_id |
string Service account to be used by the worker nodes of the Kubernetes cluster to access Container Registry or to push node logs and metrics. |
release_channel |
enum ReleaseChannel When creating a Kubernetes cluster, you should specify one of three release channels. The release channel contains several Kubernetes versions.
|
network_policy |
|
kms_provider |
KMS provider configuration. |
log_group_id |
string Log group where cluster stores cluster system logs, like audit, events, or controlplane logs. |
cilium |
Includes only one of the fields |
Master
Field |
Description |
zonal_master |
Parameters of the availability zone for the master. Includes only one of the fields |
regional_master |
Parameters of the region for the master. Includes only one of the fields |
locations[] |
Locations specification for Kubernetes control-plane (master) instances. |
etcd_cluster_size |
int64 Number of etcd nodes in cluster. |
version |
string Version of Kubernetes components that runs on the master. |
endpoints |
Endpoints of the master. Endpoints constitute of scheme and port (i.e. |
master_auth |
Master authentication parameters are used to establish trust between the master and a client. |
version_info |
Detailed information about the Kubernetes version that is running on the master. |
maintenance_policy |
Maintenance policy of the master. |
security_group_ids[] |
string Master security groups. |
master_logging |
Cloud Logging for master components. |
ZonalMaster
Field |
Description |
zone_id |
string ID of the availability zone where the master resides. |
internal_v4_address |
string IPv4 internal network address that is assigned to the master. |
external_v4_address |
string IPv4 external network address that is assigned to the master. |
RegionalMaster
Field |
Description |
region_id |
string ID of the region where the master resides. |
internal_v4_address |
string IPv4 internal network address that is assigned to the master. |
external_v4_address |
string IPv4 external network address that is assigned to the master. |
external_v6_address |
string IPv6 external network address that is assigned to the master. |
Location
Field |
Description |
zone_id |
string ID of the availability zone where the master resides. |
subnet_id |
string ID of the VPC network's subnet where the master resides. |
MasterEndpoints
Field |
Description |
internal_v4_endpoint |
string Internal endpoint that can be used to connect to the master from cloud networks. |
external_v4_endpoint |
string External endpoint that can be used to access Kubernetes cluster API from the internet (outside of the cloud). |
external_v6_endpoint |
string External IPv6 endpoint that can be used to access Kubernetes cluster API from the internet (outside of the cloud). |
MasterAuth
Field |
Description |
cluster_ca_certificate |
string PEM-encoded public certificate that is the root of trust for the Kubernetes cluster. |
VersionInfo
Field |
Description |
current_version |
string Current Kubernetes version, format: major.minor (e.g. 1.15). |
new_revision_available |
bool Newer revisions may include Kubernetes patches (e.g 1.15.1 -> 1.15.2) as well |
new_revision_summary |
string Description of the changes to be applied when updating to the latest |
version_deprecated |
bool The current version is on the deprecation schedule, component (master or node group) |
MasterMaintenancePolicy
Field |
Description |
auto_upgrade |
bool If set to true, automatic updates are installed in the specified period of time with no interaction from the user. |
maintenance_window |
Maintenance window settings. Update will start at the specified time and last no more than the specified duration. |
MaintenanceWindow
Field |
Description |
anytime |
Updating the master at any time. Includes only one of the fields Maintenance policy. |
daily_maintenance_window |
Updating the master on any day during the specified time window. Includes only one of the fields Maintenance policy. |
weekly_maintenance_window |
Updating the master on selected days during the specified time window. Includes only one of the fields Maintenance policy. |
AnytimeMaintenanceWindow
Field |
Description |
Empty |
DailyMaintenanceWindow
Field |
Description |
start_time |
Required field. Window start time, in the UTC timezone. |
duration |
Window duration. |
WeeklyMaintenanceWindow
Field |
Description |
days_of_week[] |
Days of the week and the maintenance window for these days when automatic updates are allowed. |
DaysOfWeekMaintenanceWindow
Field |
Description |
days[] |
enum DayOfWeek Days of the week when automatic updates are allowed.
|
start_time |
Required field. Window start time, in the UTC timezone. |
duration |
Window duration. |
MasterLogging
Field |
Description |
enabled |
bool Identifies whether Cloud Logging is enabled for master components. |
log_group_id |
string ID of the log group where logs of master components should be stored. Includes only one of the fields The destination of master components' logs. |
folder_id |
string ID of the folder where logs should be stored (in default group). Includes only one of the fields The destination of master components' logs. |
audit_enabled |
bool Identifies whether Cloud Logging is enabled for audit logs. |
cluster_autoscaler_enabled |
bool Identifies whether Cloud Logging is enabled for cluster-autoscaler. |
kube_apiserver_enabled |
bool Identifies whether Cloud Logging is enabled for kube-apiserver. |
events_enabled |
bool Identifies whether Cloud Logging is enabled for events. |
IPAllocationPolicy
Field |
Description |
cluster_ipv4_cidr_block |
string CIDR block. IP range for allocating pod addresses. It should not overlap with any subnet in the network the Kubernetes cluster located in. Static routes will be |
node_ipv4_cidr_mask_size |
int64 Size of the masks that are assigned for each node in the cluster. If not specified, 24 is used. |
service_ipv4_cidr_block |
string CIDR block. IP range Kubernetes service Kubernetes cluster IP addresses will be allocated from. It should not overlap with any subnet in the network the Kubernetes cluster located in. |
cluster_ipv6_cidr_block |
string IPv6 range for allocating pod IP addresses. |
service_ipv6_cidr_block |
string IPv6 range for allocating Kubernetes service IP addresses |
NetworkPolicy
Field |
Description |
provider |
enum Provider
|
KMSProvider
Field |
Description |
key_id |
string KMS key ID for secrets encryption. |
Cilium
Field |
Description |
routing_mode |
enum RoutingMode
|