Get started with Managed Kubernetes
Create a dev cluster with two nodes, run kubectl against it, and delete it again.
Replace my-cluster with a name of your own: lowercase letters, digits and hyphens, starting with a letter, at most 40 characters.
Prerequisites
- Managed Kubernetes switched on for your organization (see What is Managed Kubernetes?).
- Permission for
eks:CreateCluster,eks:CreateNodegroup,eks:CreateAddon(the cluster getsmetrics-server),eks:DescribeCluster,eks:AccessKubernetesApiandeks:DeleteCluster. In the console, alsoeks:ListClustersto open Kubernetes, andeks:ListNodegroupsfor the Nodes tab. - The dcloud CLI and
kubectlinstalled.
Step 1: Create the cluster
You pay for the control plane once it is active (a dev cluster's first 744 hours each month are
free for the organization), and for the two nodes as compute instances.
- Open Kubernetes, then choose Create cluster.
- For Name, enter my-cluster.
- Leave Control plane at Dev, and Add a first node group now selected.
- For Server type, choose a type; for Nodes, enter
2. - Choose Create cluster.
The console opens the cluster's page with the status creating.
dcloud eks clusters create --name my-cluster --tier dev \
--nodegroup '{"name":"workers","instanceType":"performance-2","minSize":1,"desiredSize":2,"maxSize":3}'The answer is the new cluster with the status creating.
Step 2: Wait until it is active
Deutsche Cloud builds the endpoint load balancer and the control-plane machine, then the nodes. Each step appears under Activity on the cluster's page.
- On the cluster's page, wait until the status in the header is
active. - Choose Nodes to see the nodes join.
dcloud eks clusters get my-clusterRepeat until status is active.
Step 3: Run kubectl
You created the cluster, so you have a ClusterAdmin access entry on it (if you act through an IAM
role, the role has it).
Sign in once:
dcloud auth loginAdd the cluster to your kubeconfig with
dcloud eks update-kubeconfig --cluster my-cluster. It adds the contextdcloud-my-clusterand switches to it.List the nodes:
kubectl get nodes
The two nodes are listed once they have joined. The control-plane machine is not a node and is not listed.
Clean up
Delete the cluster and keep nothing, so nothing is billed from then on.
- On the cluster's page, choose Danger zone.
- Select Delete permanently: keep nothing (no snapshot, volumes deleted with their data).
- Choose Delete cluster, enter the cluster name, and choose Delete cluster.
The console returns to the cluster list.
dcloud eks clusters delete my-cluster --permanent true