1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
|
syntax = "proto3";
package yandex.cloud.k8s.v1;
import "google/api/annotations.proto";
import "google/protobuf/field_mask.proto";
import "yandex/cloud/api/operation.proto";
import "yandex/cloud/k8s/v1/cluster.proto";
import "yandex/cloud/k8s/v1/node.proto";
import "yandex/cloud/k8s/v1/node_group.proto";
import "yandex/cloud/k8s/v1/version.proto";
import "yandex/cloud/operation/operation.proto";
import "yandex/cloud/validation.proto";
option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/k8s/v1;k8s";
option java_package = "yandex.cloud.api.k8s.v1";
// A set of methods for managing Kubernetes cluster.
service ClusterService {
// Returns the specified Kubernetes cluster.
//
// To get the list of available Kubernetes cluster, make a [List] request.
rpc Get(GetClusterRequest) returns (Cluster) {
option (google.api.http) = {get: "/managed-kubernetes/v1/clusters/{cluster_id}"};
}
// Retrieves the list of Kubernetes cluster in the specified folder.
rpc List(ListClustersRequest) returns (ListClustersResponse) {
option (google.api.http) = {get: "/managed-kubernetes/v1/clusters"};
}
// Creates a Kubernetes cluster in the specified folder.
rpc Create(CreateClusterRequest) returns (operation.Operation) {
option (google.api.http) = {
post: "/managed-kubernetes/v1/clusters"
body: "*"
};
option (yandex.cloud.api.operation) = {
metadata: "CreateClusterMetadata"
response: "Cluster"
};
}
// Updates the specified Kubernetes cluster.
rpc Update(UpdateClusterRequest) returns (operation.Operation) {
option (google.api.http) = {
patch: "/managed-kubernetes/v1/clusters/{cluster_id}"
body: "*"
};
option (yandex.cloud.api.operation) = {
metadata: "UpdateClusterMetadata"
response: "Cluster"
};
}
// Deletes the specified Kubernetes cluster.
rpc Delete(DeleteClusterRequest) returns (operation.Operation) {
option (google.api.http) = {delete: "/managed-kubernetes/v1/clusters/{cluster_id}"};
option (yandex.cloud.api.operation) = {
metadata: "DeleteClusterMetadata"
response: "google.protobuf.Empty"
};
}
// Stops the specified Kubernetes cluster.
rpc Stop(StopClusterRequest) returns (operation.Operation) {
option (google.api.http) = {
post: "/managed-kubernetes/v1/clusters/{cluster_id}:stop"
body: "*"
};
option (yandex.cloud.api.operation) = {
metadata: "StopClusterMetadata"
response: "Cluster"
};
}
// Starts the specified Kubernetes cluster.
rpc Start(StartClusterRequest) returns (operation.Operation) {
option (google.api.http) = {
post: "/managed-kubernetes/v1/clusters/{cluster_id}:start"
body: "*"
};
option (yandex.cloud.api.operation) = {
metadata: "StartClusterMetadata"
response: "Cluster"
};
}
// Lists nodegroup for the specified Kubernetes cluster.
rpc ListNodeGroups(ListClusterNodeGroupsRequest) returns (ListClusterNodeGroupsResponse) {
option (google.api.http) = {get: "/managed-kubernetes/v1/clusters/{cluster_id}/nodeGroups"};
}
// Lists operations for the specified Kubernetes cluster.
rpc ListOperations(ListClusterOperationsRequest) returns (ListClusterOperationsResponse) {
option (google.api.http) = {get: "/managed-kubernetes/v1/clusters/{cluster_id}/operations"};
}
// Lists cluster's nodes.
rpc ListNodes(ListClusterNodesRequest) returns (ListClusterNodesResponse) {
option (google.api.http) = {get: "/managed-kubernetes/v1/clusters/{cluster_id}/nodes"};
}
}
message GetClusterRequest {
// ID of the Kubernetes cluster to return.
string cluster_id = 1 [(required) = true];
}
message ListClustersRequest {
// ID of the folder to list Kubernetes cluster in.
// To get the folder ID use a [yandex.cloud.resourcemanager.v1.FolderService.List] request.
string folder_id = 1 [(required) = true];
// The maximum number of results per page to return. If the number of available
// results is larger than [page_size],
// the service returns a [ListClustersResponse.next_page_token]
// that can be used to get the next page of results in subsequent list requests.
// Default value: 100.
int64 page_size = 2 [(value) = "0-1000"];
// Page token. To get the next page of results, set `page_token` to the
// [ListClustersResponse.next_page_token] returned by a previous list request.
string page_token = 3 [(length) = "<=100"];
// A filter expression that filters resources listed in the response.
// The expression must specify:
// 1. The field name. Currently you can use filtering only on [Cluster.name] field.
// 2. An `=` operator.
// 3. The value in double quotes (`"`). Must be 3-63 characters long and match the regular expression `[a-z][-a-z0-9]{1,61}[a-z0-9]`.
string filter = 4 [(length) = "<=1000"];
}
message ListClustersResponse {
// List of Kubernetes cluster.
repeated Cluster clusters = 1;
// This token allows you to get the next page of results for list requests. If the number of results
// is larger than [ListClustersRequest.page_size], use
// the `next_page_token` as the value
// for the [ListClustersRequest.page_token] query parameter
// in the next list request. Each subsequent list request will have its own
// `next_page_token` to continue paging through the results.
string next_page_token = 2;
}
message DeleteClusterRequest {
// ID of the Kubernetes cluster to delete.
// To get Kubernetes cluster ID use a [ClusterService.List] request.
string cluster_id = 1 [(required) = true];
}
message DeleteClusterMetadata {
// ID of the Kubernetes cluster that is being deleted.
string cluster_id = 1;
}
message StopClusterRequest {
// ID of the Kubernetes cluster to stop.
// To get Kubernetes cluster ID use a [ClusterService.List] request.
string cluster_id = 1 [(required) = true];
}
message StopClusterMetadata {
// ID of the Kubernetes cluster that is being stopped.
string cluster_id = 1;
}
message StartClusterRequest {
// ID of the Kubernetes cluster to start.
// To get Kubernetes cluster ID use a [ClusterService.List] request.
string cluster_id = 1 [(required) = true];
}
message StartClusterMetadata {
// ID of the Kubernetes cluster that is being started.
string cluster_id = 1;
}
message UpdateClusterRequest {
// ID of the Kubernetes cluster to update.
// To get the Kubernetes cluster ID use a [ClusterService.List] request.
string cluster_id = 1 [(required) = true];
google.protobuf.FieldMask update_mask = 2;
// Name of the Kubernetes cluster.
// The name must be unique within the folder.
string name = 3 [(pattern) = "|[a-z]([-a-z0-9]{0,61}[a-z0-9])?"];
// Description of the Kubernetes cluster.
string description = 4 [(length) = "<=256"];
// Resource labels as `key:value` pairs.
//
// Existing set of `labels` is completely replaced by the provided set.
map<string, string> labels = 5 [
(size) = "<=64",
(length) = "<=63",
(pattern) = "[-_./\\@0-9a-z]*",
(map_key).length = "1-63",
(map_key).pattern = "[a-z][-_./\\@0-9a-z]*"
];
oneof internet_gateway {
// Gateway IPv4 address.
string gateway_ipv4_address = 6 [(length) = "<=15"];
}
// Specification of the master update.
MasterUpdateSpec master_spec = 7;
// Service account to be used for provisioning Compute Cloud and VPC resources for Kubernetes cluster.
// Selected service account should have `edit` role on the folder where the Kubernetes cluster will be
// located and on the folder where selected network resides.
string service_account_id = 9;
// Service account to be used by the worker nodes of the Kubernetes cluster to access Container Registry
// or to push node logs and metrics.
string node_service_account_id = 8;
NetworkPolicy network_policy = 10;
IPAllocationPolicy ip_allocation_policy = 11;
}
message MasterUpdateSpec {
// Specification of the master update.
UpdateVersionSpec version = 1;
// Maintenance policy of the master.
MasterMaintenancePolicy maintenance_policy = 2;
// Master security groups.
repeated string security_group_ids = 3;
// Cloud Logging for master components.
MasterLogging master_logging = 4;
// Update master instance locations.
repeated LocationSpec locations = 5;
}
message UpdateClusterMetadata {
// ID of the Kubernetes cluster that is being updated.
string cluster_id = 1;
}
message CreateClusterRequest {
// ID of the folder to create a Kubernetes cluster in.
// To get the folder ID use a [yandex.cloud.resourcemanager.v1.FolderService.List] request.
string folder_id = 1 [(required) = true];
// Name of the Kubernetes cluster.
// The name must be unique within the folder.
string name = 2 [(pattern) = "|[a-z]([-a-z0-9]{0,61}[a-z0-9])?"];
// Description of the Kubernetes cluster.
string description = 3 [(length) = "<=256"];
// Resource labels as `key:value` pairs.
map<string, string> labels = 4 [
(size) = "<=64",
(length) = "<=63",
(pattern) = "[-_./\\@0-9a-z]*",
(map_key).length = "1-63",
(map_key).pattern = "[a-z][-_./\\@0-9a-z]*"
];
// ID of the network.
string network_id = 5 [(required) = true];
// Master specification of the Kubernetes cluster.
MasterSpec master_spec = 6 [(required) = true];
// IP allocation policy of the Kubernetes cluster.
IPAllocationPolicy ip_allocation_policy = 7;
oneof internet_gateway {
// Gateway IPv4 address.
string gateway_ipv4_address = 8;
}
// Service account to be used for provisioning Compute Cloud and VPC resources for Kubernetes cluster.
// Selected service account should have `edit` role on the folder where the Kubernetes cluster will be
// located and on the folder where selected network resides.
string service_account_id = 9 [(required) = true];
// Service account to be used by the worker nodes of the Kubernetes cluster to access Container Registry or to push node logs and metrics.
string node_service_account_id = 10 [(required) = true];
// Release channel for the master.
ReleaseChannel release_channel = 11;
NetworkPolicy network_policy = 12;
// KMS provider configuration.
KMSProvider kms_provider = 13;
oneof network_implementation {
Cilium cilium = 14;
}
}
message CreateClusterMetadata {
// ID of the Kubernetes cluster that is being created.
string cluster_id = 1;
}
message AutoUpgradeMasterMetadata {
// ID of the Kubernetes cluster that is being auto upgraded.
string cluster_id = 1;
}
message ListClusterOperationsRequest {
// ID of the Kubernetes cluster to list operations for.
string cluster_id = 1 [(required) = true];
// The maximum number of results per page that should be returned. If the number of available
// results is larger than [page_size], the service returns a [ListClusterOperationsResponse.next_page_token]
// that can be used to get the next page of results in subsequent list requests.
// Default value: 100.
int64 page_size = 2 [(value) = "0-1000"];
// Page token. To get the next page of results, set `page_token` to the
// [ListClusterOperationsResponse.next_page_token] returned by a previous list request.
string page_token = 3 [(length) = "<=100"];
// A filter expression that filters resources listed in the response.
// Currently you can use filtering only on [Cluster.name] field.
string filter = 4 [(length) = "<=1000"];
}
message ListClusterOperationsResponse {
// List of operations for the specified Kubernetes cluster.
repeated operation.Operation operations = 1;
// This token allows you to get the next page of results for list requests. If the number of results
// is larger than [ListClusterOperationsRequest.page_size], use the `next_page_token` as the value
// for the [ListClusterOperationsRequest.page_token] query parameter in the next list request.
// Each subsequent list request will have its own `next_page_token` to continue paging through the results.
string next_page_token = 2;
}
message ListClusterNodeGroupsRequest {
// ID of the Kubernetes cluster to list node groups in.
// To get the Kubernetes cluster ID use a [ClusterService.List] request.
string cluster_id = 1 [(required) = true];
// The maximum number of results per page to return. If the number of available
// results is larger than [page_size],
// the service returns a [ListClusterNodeGroupsResponse.next_page_token]
// that can be used to get the next page of results in subsequent list requests.
// Default value: 100.
int64 page_size = 2 [(value) = "0-1000"];
// Page token. To get the next page of results, set `page_token` to the
// [ListClusterNodeGroupsResponse.next_page_token] returned by a previous list request.
string page_token = 3 [(length) = "<=100"];
// A filter expression that filters resources listed in the response.
// Currently you can use filtering only on [Cluster.name] field.
string filter = 4 [(length) = "<=1000"];
}
message ListClusterNodeGroupsResponse {
// List of node groups for the specified Kubernetes cluster.
repeated NodeGroup node_groups = 1;
// This token allows you to get the next page of results for list requests. If the number of results
// is larger than [ListClusterNodeGroupsRequest.page_size], use
// the `next_page_token` as the value
// for the [ListClusterNodeGroupsRequest.page_token] query parameter
// in the next list request. Each subsequent list request will have its own
// `next_page_token` to continue paging through the results.
string next_page_token = 2;
}
message ListClusterNodesRequest {
// ID of the Kubernetes cluster to list nodes in.
// To get the Kubernetes cluster ID use a [ClusterService.List] request.
string cluster_id = 1 [(required) = true];
// The maximum number of results per page to return. If the number of available
// results is larger than [page_size],
// the service returns a [ListClusterNodesResponse.next_page_token]
// that can be used to get the next page of results in subsequent list requests.
// Default value: 100.
int64 page_size = 2 [(value) = "0-1000"];
// Page token. To get the next page of results, set `page_token` to the
// [ListClusterNodeGroupsResponse.next_page_token] returned by a previous list request.
string page_token = 3 [(length) = "<=100"];
}
message ListClusterNodesResponse {
// List of nodes for the specified Kubernetes cluster.
repeated Node nodes = 1;
// This token allows you to get the next page of results for list requests. If the number of results
// is larger than [ListClusterNodesRequest.page_size], use
// the `next_page_token` as the value
// for the [ListClusterNodesRequest.page_token] query parameter
// in the next list request. Each subsequent list request will have its own
// `next_page_token` to continue paging through the results.
string next_page_token = 2;
}
message MasterSpec {
reserved 5;
oneof master_type {
// Specification of the zonal master.
ZonalMasterSpec zonal_master_spec = 1;
// Specification of the regional master.
RegionalMasterSpec regional_master_spec = 2;
}
// Locations specification for Kubernetes control-plane (master) instances.
// Works in conjunction with [etcd_cluster_size]. See it's documentation for details.
// Possible combinations:
// - 1 location and etcd_cluster_size = 1 - a single node cluster whose availability is limited by the availability of a single Compute Instance; downtime is expected during cluster updates.
// - 1 location and etcd_cluster_size = 3 - a highly available cluster within a single availability zone; can survive the failure of a Compute Instance, a server, or an individual server rack.
// - 3 location and etcd_cluster_size = 3 - a highly available cluster with each etcd instance located within separate availability zone; can survive the failure of a single availability zone.
repeated LocationSpec locations = 8;
// Number of etcd nodes in cluster.
// Works in conjunction with [locations]. See it's documentation for details.
// Optional. If not set, will be assumed equal to the number of locations.
int64 etcd_cluster_size = 9 [(value) = "0,1,3"];
// Specification of parameters for external IPv4 networking.
ExternalAddressSpec external_v4_address_spec = 10;
// Specification of parameters for external IPv6 networking.
ExternalAddressSpec external_v6_address_spec = 11;
// Version of Kubernetes components that runs on the master.
string version = 3;
// Maintenance policy of the master.
MasterMaintenancePolicy maintenance_policy = 4;
// Master security groups.
repeated string security_group_ids = 6;
// Cloud Logging for master components.
MasterLogging master_logging = 7;
}
message ZonalMasterSpec {
// ID of the availability zone.
string zone_id = 1 [(required) = true];
// Specification of parameters for internal IPv4 networking.
InternalAddressSpec internal_v4_address_spec = 2;
// Specification of parameters for external IPv4 networking.
ExternalAddressSpec external_v4_address_spec = 3;
}
message RegionalMasterSpec {
// ID of the availability zone where the master resides.
string region_id = 1 [(required) = true];
// List of locations where the master will be allocated.
repeated MasterLocation locations = 2;
// Specify to allocate a static public IP for the master.
ExternalAddressSpec external_v4_address_spec = 3;
// Specification of parameters for external IPv6 networking.
ExternalAddressSpec external_v6_address_spec = 4;
}
message InternalAddressSpec {
// 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.
string subnet_id = 2;
}
message ExternalAddressSpec {
// IP address.
string address = 1;
}
message MasterLocation {
// ID of the availability zone.
string zone_id = 1 [(required) = true];
// If not specified and there is a single subnet in specified zone, address
// in this subnet will be allocated.
InternalAddressSpec internal_v4_address_spec = 2;
}
message LocationSpec {
// ID of the availability zone where the master resides.
string zone_id = 1 [(required) = true];
// ID of the VPC network's subnet where the master resides.
// If not specified and there is a single subnet in specified zone, address in this subnet will be allocated.
string subnet_id = 2;
}
|