Viewing operations with a Managed Service for Kubernetes cluster
All actions with Managed Service for Kubernetes resources are logged as a list of operations. Each operation is assigned a unique ID.
Getting a list of operations
To view operations with all Kubernetes clusters, in the left-hand panel, select
You can get a list of operations for a specific cluster:
-
In the management console
, open the folder with the cluster. -
Select Managed Service for Kubernetes.
-
Select the cluster you need.
-
Go to the
Operations panel for the selected cluster.You will see a list of operations with the selected cluster.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To get a list of operations for a Managed Service for Kubernetes cluster, run this command:
yc managed-kubernetes cluster list-operations <cluster_name_or_ID>
Result:
+----------------------+---------------------+----------------------+---------------------+--------+----------------+
| ID | CREATED AT | CREATED BY | MODIFIED AT | STATUS | DESCRIPTION |
+----------------------+---------------------+----------------------+---------------------+--------+----------------+
| cat5g6mqaccn******** | 2024-05-14 18:40:02 | aje9k8luj4qf******** | 2024-05-14 18:40:03 | DONE | Update cluster |
| cati1flsiarv******** | 2024-05-14 18:29:13 | aje9k8luj4qf******** | 2024-05-14 18:36:17 | DONE | Create cluster |
+----------------------+---------------------+----------------------+---------------------+--------+----------------+
By default, information about operations is provided as text. To get a detailed information, specify the yaml
or json
output data format using the --format
flag:
yc managed-kubernetes cluster list-operations <cluster_name_or_ID> --format yaml
Result:
- id: cat5g6mqaccn********
description: Update cluster
created_at: "2024-05-14T18:40:02Z"
created_by: aje9k8luj4qf********
modified_at: "2024-05-14T18:40:03Z"
done: true
metadata:
'@type': type.googleapis.com/yandex.cloud.k8s.v1.UpdateClusterMetadata
cluster_id: cathr91hiupd********
response:
'@type': type.googleapis.com/yandex.cloud.k8s.v1.Cluster
id: cathr91hiupd********
folder_id: b1g681qpemb4********
created_at: "2024-05-14T18:29:13Z"
name: my-k8s-logs
status: RUNNING
health: HEALTHY
network_id: enpphqi8uvcm********
...
service_account_id: ajeevjv1lv01********
node_service_account_id: ajeevjv1lv01********
release_channel: REGULAR
- id: cati1flsiarv********
description: Create cluster
created_at: "2024-05-14T18:29:13Z"
created_by: aje9k8luj4qf********
modified_at: "2024-05-14T18:36:17Z"
done: true
metadata:
'@type': type.googleapis.com/yandex.cloud.k8s.v1.CreateClusterMetadata
cluster_id: cathr91hiupd********
response:
'@type': type.googleapis.com/yandex.cloud.k8s.v1.Cluster
id: cathr91hiupd********
folder_id: b1g681qpemb4********
created_at: "2024-05-14T18:29:13Z"
name: my-k8s
status: RUNNING
health: HEALTHY
network_id: enpphqi8uvcm********
...
node_service_account_id: ajeevjv1lv01********
release_channel: REGULAR
Use either the listOperations REST API method for the Cluster resource or the ClusterService/ListOperations gRPC API call.
Getting detailed information about an operation
-
Get a list of operations for the Managed Service for Kubernetes cluster.
-
Copy the ID of the operation.
-
Get detailed information about the operation:
CLIAPIIf you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the
--folder-name
or--folder-id
parameter.Run this command:
yc operation get <operation_ID>
Result:
id: cat5g6mqaccn******** description: Update cluster created_at: "2024-05-14T18:40:02Z" created_by: aje9k8luj4qf******** modified_at: "2024-05-14T18:40:03Z" done: true metadata: '@type': type.googleapis.com/yandex.cloud.k8s.v1.UpdateClusterMetadata cluster_id: cathr91hiupd******** response: '@type': type.googleapis.com/yandex.cloud.k8s.v1.Cluster id: cathr91hiupd******** folder_id: b1g681qpemb4******** created_at: "2024-05-14T18:29:13Z" name: my-k8s-logs status: RUNNING health: HEALTHY network_id: enpphqi8uvcm******** ... service_account_id: ajeevjv1lv01******** node_service_account_id: ajeevjv1lv01******** release_channel: REGULAR
Use the OperationService/Get gRPC API call.