Managed Services for Kubernetes API, REST: Cluster.Create
- HTTP request
- Body parameters
- MasterSpec
- ZonalMasterSpec
- InternalAddressSpec
- ExternalAddressSpec
- RegionalMasterSpec
- MasterLocation
- LocationSpec
- MasterMaintenancePolicy
- MaintenanceWindow
- DailyMaintenanceWindow
- TimeOfDay
- WeeklyMaintenanceWindow
- DaysOfWeekMaintenanceWindow
- MasterScalePolicySpec
- AutoScale
- MasterLogging
- IPAllocationPolicy
- NetworkPolicy
- KMSProvider
- Cilium
- WorkloadIdentityFederationSpec
- Response
- Status
Creates a Kubernetes cluster in the specified folder.
HTTP request
POST https://mks.api.cloud.yandex.net/managed-kubernetes/v1/clusters
Body parameters
{
"folderId": "string",
"name": "string",
"description": "string",
"labels": "object",
"networkId": "string",
"masterSpec": {
// Includes only one of the fields `zonalMasterSpec`, `regionalMasterSpec`
"zonalMasterSpec": {
"zoneId": "string",
"internalV4AddressSpec": {
"subnetId": "string"
},
"externalV4AddressSpec": {
"address": "string"
}
},
"regionalMasterSpec": {
"regionId": "string",
"locations": [
{
"zoneId": "string",
"internalV4AddressSpec": {
"subnetId": "string"
}
}
],
"externalV4AddressSpec": {
"address": "string"
},
"externalV6AddressSpec": {
"address": "string"
}
},
// end of the list of possible fields
"locations": [
{
"zoneId": "string",
"subnetId": "string"
}
],
"etcdClusterSize": "string",
"externalV4AddressSpec": {
"address": "string"
},
"externalV6AddressSpec": {
"address": "string"
},
"version": "string",
"maintenancePolicy": {
"autoUpgrade": "boolean",
"maintenanceWindow": {
// Includes only one of the fields `anytime`, `dailyMaintenanceWindow`, `weeklyMaintenanceWindow`
"anytime": "object",
"dailyMaintenanceWindow": {
"startTime": {
"hours": "integer",
"minutes": "integer",
"seconds": "integer",
"nanos": "integer"
},
"duration": "string"
},
"weeklyMaintenanceWindow": {
"daysOfWeek": [
{
"days": [
"string"
],
"startTime": {
"hours": "integer",
"minutes": "integer",
"seconds": "integer",
"nanos": "integer"
},
"duration": "string"
}
]
}
// end of the list of possible fields
}
},
"scalePolicy": {
// Includes only one of the fields `autoScale`
"autoScale": {
"minResourcePresetId": "string"
}
// end of the list of possible fields
},
"securityGroupIds": [
"string"
],
"masterLogging": {
"enabled": "boolean",
// Includes only one of the fields `logGroupId`, `folderId`
"logGroupId": "string",
"folderId": "string",
// end of the list of possible fields
"auditEnabled": "boolean",
"clusterAutoscalerEnabled": "boolean",
"kubeApiserverEnabled": "boolean",
"eventsEnabled": "boolean"
}
},
"ipAllocationPolicy": {
"clusterIpv4CidrBlock": "string",
"nodeIpv4CidrMaskSize": "string",
"serviceIpv4CidrBlock": "string",
"clusterIpv6CidrBlock": "string",
"serviceIpv6CidrBlock": "string",
"clusterIpv4CidrBlocks": [
"string"
],
"clusterIpv6CidrBlocks": [
"string"
]
},
// Includes only one of the fields `gatewayIpv4Address`
"gatewayIpv4Address": "string",
// end of the list of possible fields
"serviceAccountId": "string",
"nodeServiceAccountId": "string",
"releaseChannel": "string",
"networkPolicy": {
"provider": "string"
},
"kmsProvider": {
"keyId": "string"
},
// Includes only one of the fields `cilium`
"cilium": {
"routingMode": "string"
},
// end of the list of possible fields
"workloadIdentityFederation": {
"enabled": "boolean"
}
}
|
Field |
Description |
|
folderId |
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 |
|
networkId |
string ID of the network. |
|
masterSpec |
Required field. Master specification of the Kubernetes cluster. |
|
ipAllocationPolicy |
IP allocation policy of the Kubernetes cluster. |
|
gatewayIpv4Address |
string Gateway IPv4 address. The maximum string length in characters is 15. Includes only one of the fields |
|
serviceAccountId |
string Required field. Service account to be used for provisioning Compute Cloud and VPC resources for Kubernetes cluster. |
|
nodeServiceAccountId |
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. |
|
releaseChannel |
enum (ReleaseChannel) Release channel for the master.
|
|
networkPolicy |
|
|
kmsProvider |
KMS provider configuration. |
|
cilium |
Includes only one of the fields |
|
workloadIdentityFederation |
MasterSpec
|
Field |
Description |
|
zonalMasterSpec |
Specification of the zonal master. Includes only one of the fields |
|
regionalMasterSpec |
Specification of the regional master. Includes only one of the fields |
|
locations[] |
Locations specification for Kubernetes control-plane (master) instances.
|
|
etcdClusterSize |
string (int64) Number of etcd nodes in cluster. |
|
externalV4AddressSpec |
Specification of parameters for external IPv4 networking. |
|
externalV6AddressSpec |
Specification of parameters for external IPv6 networking. |
|
version |
string Version of Kubernetes components that runs on the master. |
|
maintenancePolicy |
Maintenance policy of the master. |
|
scalePolicy |
Scale policy of the master. |
|
securityGroupIds[] |
string Master security groups. |
|
masterLogging |
Export configuration of master logs. |
ZonalMasterSpec
|
Field |
Description |
|
zoneId |
string Required field. ID of the availability zone. |
|
internalV4AddressSpec |
Specification of parameters for internal IPv4 networking. |
|
externalV4AddressSpec |
Specification of parameters for external IPv4 networking. |
InternalAddressSpec
|
Field |
Description |
|
subnetId |
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 |
|
regionId |
string Required field. ID of the availability zone where the master resides. |
|
locations[] |
List of locations where the master will be allocated. |
|
externalV4AddressSpec |
Specify to allocate a static public IP for the master. |
|
externalV6AddressSpec |
Specification of parameters for external IPv6 networking. |
MasterLocation
|
Field |
Description |
|
zoneId |
string Required field. ID of the availability zone. |
|
internalV4AddressSpec |
If not specified and there is a single subnet in specified zone, address |
LocationSpec
|
Field |
Description |
|
zoneId |
string Required field. ID of the availability zone where the master resides. |
|
subnetId |
string ID of the VPC network's subnet where the master resides. |
MasterMaintenancePolicy
|
Field |
Description |
|
autoUpgrade |
boolean If set to true, automatic updates are installed in the specified period of time with no interaction from the user. |
|
maintenanceWindow |
Maintenance window settings. Update will start at the specified time and last no more than the specified duration. |
MaintenanceWindow
|
Field |
Description |
|
anytime |
object Updating the master at any time. Includes only one of the fields Maintenance policy. |
|
dailyMaintenanceWindow |
Updating the master on any day during the specified time window. Includes only one of the fields Maintenance policy. |
|
weeklyMaintenanceWindow |
Updating the master on selected days during the specified time window. Includes only one of the fields Maintenance policy. |
DailyMaintenanceWindow
|
Field |
Description |
|
startTime |
Required field. Window start time, in the UTC timezone. |
|
duration |
string (duration) Window duration. |
TimeOfDay
Represents a time of day. The date and time zone are either not significant
or are specified elsewhere. An API may choose to allow leap seconds. Related
types are google.type.Date
|
Field |
Description |
|
hours |
integer (int32) Hours of day in 24 hour format. Should be from 0 to 23. An API may choose |
|
minutes |
integer (int32) Minutes of hour of day. Must be from 0 to 59. |
|
seconds |
integer (int32) Seconds of minutes of the time. Must normally be from 0 to 59. An API may |
|
nanos |
integer (int32) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. |
WeeklyMaintenanceWindow
|
Field |
Description |
|
daysOfWeek[] |
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.
|
|
startTime |
Required field. Window start time, in the UTC timezone. |
|
duration |
string (duration) Window duration. |
MasterScalePolicySpec
|
Field |
Description |
|
autoScale |
Includes only one of the fields |
AutoScale
Scalable master instance resources.
|
Field |
Description |
|
minResourcePresetId |
string Required field. Preset of computing resources to be used as lower boundary for scaling. |
MasterLogging
|
Field |
Description |
|
enabled |
boolean Specifies whether master logs should be exported. |
|
logGroupId |
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. |
|
folderId |
string ID of the folder where logs should be stored. Value must match the regular expression Includes only one of the fields The destination of master components' logs. |
|
auditEnabled |
boolean Specifies whether audit logs should be exported |
|
clusterAutoscalerEnabled |
boolean Specifies whether cluster-autoscaler logs should be exported |
|
kubeApiserverEnabled |
boolean Specifies whether kube-apiserver logs should be exported |
|
eventsEnabled |
boolean Specifies whether Kubernetes events should be exported |
IPAllocationPolicy
|
Field |
Description |
|
clusterIpv4CidrBlock |
string CIDR block. IP range for allocating pod addresses. |
|
nodeIpv4CidrMaskSize |
string (int64) Size of the masks that are assigned for each node in the cluster. |
|
serviceIpv4CidrBlock |
string CIDR block. IP range Kubernetes service Kubernetes cluster IP addresses will be allocated from. |
|
clusterIpv6CidrBlock |
string IPv6 range for allocating pod IP addresses. |
|
serviceIpv6CidrBlock |
string IPv6 range for allocating Kubernetes service IP addresses |
|
clusterIpv4CidrBlocks[] |
string IP ranges for allocating pod addresses (multiple CIDRs for dual-stack or extended address space). |
|
clusterIpv6CidrBlocks[] |
string IPv6 ranges for allocating pod addresses (multiple CIDRs). |
NetworkPolicy
|
Field |
Description |
|
provider |
enum (Provider)
|
KMSProvider
|
Field |
Description |
|
keyId |
string KMS key ID for secrets encryption. |
Cilium
|
Field |
Description |
|
routingMode |
enum (RoutingMode)
|
WorkloadIdentityFederationSpec
|
Field |
Description |
|
enabled |
boolean Identifies whether Workload Identity Federation is enabled. |
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": "boolean",
"metadata": "object",
// Includes only one of the fields `error`, `response`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
},
"response": "object"
// 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. |
|
createdAt |
string (date-time) Creation timestamp. String in RFC3339 To work with values in this field, use the APIs described in the |
|
createdBy |
string ID of the user or service account who initiated the operation. |
|
modifiedAt |
string (date-time) The time when the Operation resource was last modified. String in RFC3339 To work with values in this field, use the APIs described in the |
|
done |
boolean If the value is |
|
metadata |
object 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 |
object The normal response of the operation in case of success. Includes only one of the fields The operation result. |
Status
The error result of the operation in case of failure or cancellation.
|
Field |
Description |
|
code |
integer (int32) Error code. An enum value of google.rpc.Code |
|
message |
string An error message. |
|
details[] |
object A list of messages that carry the error details. |