Managed Services for Kubernetes API, gRPC: ClusterService.Create
- gRPC request
- CreateClusterRequest
- MasterSpec
- ZonalMasterSpec
- InternalAddressSpec
- ExternalAddressSpec
- RegionalMasterSpec
- MasterLocation
- LocationSpec
- MasterMaintenancePolicy
- MaintenanceWindow
- AnytimeMaintenanceWindow
- DailyMaintenanceWindow
- WeeklyMaintenanceWindow
- DaysOfWeekMaintenanceWindow
- MasterScalePolicySpec
- AutoScale
- MasterLogging
- IPAllocationPolicy
- NetworkPolicy
- KMSProvider
- Cilium
- WorkloadIdentityFederationSpec
- operation.Operation
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
}
},
"scale_policy": {
// Includes only one of the fields `auto_scale`
"auto_scale": {
"min_resource_preset_id": "string"
}
// 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
"workload_identity_federation": {
"enabled": "bool"
}
}
|
Field |
Description |
|
folder_id |
string Required field. ID of the folder to create a Kubernetes cluster in. |
|
name |
string Name of the Kubernetes cluster. Value must match the regular expression |
|
description |
string Description of the Kubernetes cluster. The maximum string length in characters is 256. |
|
labels |
object (map<string, string>) Resource labels as The maximum string length in characters for each value is 63. The string length in characters for each key must be 1-63. Each key must match the regular expression |
|
network_id |
string 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. The maximum string length in characters is 15. 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 |
|
workload_identity_federation |
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. |
|
scale_policy |
Scale 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. The number of elements must be in the range 1-7. |
DaysOfWeekMaintenanceWindow
|
Field |
Description |
|
days[] |
enum DayOfWeek Days of the week when automatic updates are allowed. The number of elements must be in the range 1-7.
|
|
start_time |
Required field. Window start time, in the UTC timezone. |
|
duration |
Window duration. |
MasterScalePolicySpec
|
Field |
Description |
|
auto_scale |
Includes only one of the fields |
AutoScale
Scalable master instance resources.
|
Field |
Description |
|
min_resource_preset_id |
string Required field. Preset of computing resources to be used as lower boundary for scaling. |
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. Value must match the regular expression 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). Value must match the regular expression 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. |
|
node_ipv4_cidr_mask_size |
int64 Size of the masks that are assigned for each node in the cluster. |
|
service_ipv4_cidr_block |
string CIDR block. IP range Kubernetes service Kubernetes cluster IP addresses will be allocated from. |
|
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
|
WorkloadIdentityFederationSpec
|
Field |
Description |
|
enabled |
bool Identifies whether Workload Identity Federation is enabled. |
operation.Operation
{
"id": "string",
"description": "string",
"created_at": "google.protobuf.Timestamp",
"created_by": "string",
"modified_at": "google.protobuf.Timestamp",
"done": "bool",
"metadata": "google.protobuf.Any",
// Includes only one of the fields `error`, `response`
"error": "google.rpc.Status",
"response": "google.protobuf.Any"
// 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. |