Managing Kubernetes Clusters
To create a Kubernetes cluster:
- In the Control panel of the Selectel Cloud Platform, go to the Kubernetes section in the project (learn more about projects).
- Click Create cluster. You can create two Kubernetes clusters in a single project of one region.
- Specify the Region. Read more about regions and availability zones in the article. It is impossible to change the region for the created cluster.
- Specify the Kubernetes version. Version 1.15.7 is now available. Versions 1.16.x and 1.17.x will be available in the future. It will be possible to update the Kubernetes version in a running cluster.
- Enter the cluster name. The cluster name will be displayed in the names of the cluster entities: node group, node, load balancer, network, and volumes. For example, if the cluster name is kelsie, then the node group name will be kelsie-node-gdc8q, and the boot volume name will be kelsie-node-gdc8q-volume.
Specify the node group configuration. A node group combines nodes of the same configuration in a single zone. You can change the number of nodes in one group – reduce or increase this number after creating a cluster. You can also add new node groups of a different configuration or delete existing ones.
- Specify the node resource configurations. Click Choose. Specify the number of vCPUs, the RAM size, boot volume type, and its size in the new window.
Select the required number of nodes in the Amount of nodes field.
Please note that if the cluster has only 1 node, then node auto-recovery and auto-upgrade of the Kubernetes patch version are not available.._
Specify the zone where you want to place the node group. You can create a cluster with node groups in different Availability zones in the regions where this is possible. This allows you to keep the app available in the event of an accident in one of the zones.
Network. All cluster nodes will be united by one private network, which will be created automatically along with the cluster. A router will also be created. It will be possible to create a cluster in an already existing private network in the future.
Access to the nodes. Load the SSH-key to access the nodes. You don’t need to load an SSH-key to create a cluster.
Please note that we do not recommend to make manual changes to the node to avoid cluster failure.
Creating a cluster takes several minutes. When creating, the cluster is in PENDING_CREATE status. As soon as the cluster switches to ACTIVE status, it is ready to run.
To start working with the cluster, configure the environment:
- Install the Kubernetes Console Client.
- Download kubeconfig cluster from the Settings section of your cluster in the Control panel.
Export the path to the previously downloaded cluster_name.yaml:
Check if the configuration is correct by accessing the cluster using the kubectl console client:
~> kubectl get nodes NAME STATUS ROLES AGE VERSION cluster-node-5xx55 Ready <none> 1m v1.15.7 cluster-node-9gtgn Ready <none> 1m v1.15.7 cluster-node-n9mkn Ready <none> 1m v1.15.7
You can manage a cluster using all available kubectl options described in the official documentation.