Changing clusters Kubernetes
To access a Kubernetes cluster, use its name or unique ID. You can get them by using the following command:
$ yc managed-kubernetes cluster list
+----------------------+----------+---------------------+---------+---------+-------------------------+-----------------------+
| ID | NAME | CREATED AT | HEALTH | STATUS | EXTERNAL ENDPOINT | INTERNAL ENDPOINT |
+----------------------+----------+---------------------+---------+---------+-------------------------+-----------------------+
| cati493bu7ian006a5j7 | k8s-demo | 2019-11-20 11:26:36 | HEALTHY | RUNNING | https://84.201.174.147/ | https://192.168.0.27/ |
+----------------------+----------+---------------------+---------+---------+-------------------------+-----------------------+
Changing clusters Kubernetes
You can change the following parameters of a Kubernetes cluster:
- Name.
- Description.
- Service accounts.
- Kubernetes version.
- Update policy.
To change a Kubernetes cluster:
- Open Managed Service for Kubernetes in the folder where you want to change the Kubernetes cluster.
- Click on the name of the Kubernetes cluster you.
- Click Edit in the upper-right corner.
- Change the necessary parameters in the window that opens.
- Click Save changes.
Get detailed information about the command to change a Kubernetes cluster:
$ yc managed-kubernetes cluster update --help
To change the Kubernetes cluster, use the following parameters:
--new-name
: Change the name.--description
: Change the description.--service-account-id
,--service-account-name
: Change the service account for the resources.--node-service-account-id
,--node-service-account-name
: Change the service account for the nodes.--version
: Change the Kubernetes version.--latest-revision
: Get all available updates for the current version of the master.--auto-upgrade
: Manage automatic updates.- Managing the maintenance window:
--anytime-maintenance-window
: Run the maintenance at any time.--daily-maintenance-window
: Perform maintenance daily at the selected time.--weekly-maintenance-window
: Perform maintenance on the selected days.
Managing cluster labels Kubernetes
You can perform the following actions with Kubernetes cluster labels:
Adding a label
If you don't have the Yandex.Cloud command line interface yet, install and initialize it.
Add a label to the Kubernetes cluster:
$ yc managed-kubernetes cluster add-labels k8s-demo --labels new_label=test_label
done (1s)
id: cati493bu7ian006a4a8
folder_id: b1g88tflru0ek1omtsu0
created_at: "2019-11-20T11:26:36Z"
name: k8s-demo
description: My test Kubernetes cluster
labels:
new_label: test_label
...
Updating a label
If you don't have the Yandex.Cloud command line interface yet, install and initialize it.
Change the Kubernetes cluster label:
Warning
The existing set of labels
is completely replaced by the set transmitted.
$ yc managed-kubernetes cluster update k8s-demo --labels test_label=my_k8s_label
done (1s)
id: cati493bu7ian006a4a8
folder_id: b1g88tflru0ek1omtsu0
created_at: "2019-11-20T11:26:36Z"
name: k8s-demo
description: My test Kubernetes cluster
labels:
test_label: my_k8s_label
status: RUNNING
health: HEALTHY
...
Deleting a label
If you don't have the Yandex.Cloud command line interface yet, install and initialize it.
Remove a label from a Kubernetes cluster:
$ yc managed-kubernetes cluster remove-labels k8s-demo --labels test_label
done (1s)
id: cati493bu7ian006a4a8
folder_id: b1g88tflru0ek1omtsu0
created_at: "2019-11-20T11:26:36Z"
name: k8s-demo
description: My test Kubernetes cluster
status: RUNNING
health: HEALTHY
...