On This Page
Deploying the cluster
To deploy the cluster with all the resources we configured before, run
kops create -f cluster.yaml
kops update cluster --name $CLUSTER_NAME --yes
The cluster is starting. It should be ready in a few minutes. Wait some minutes, and you can get the kubeconfig credentials:
kops export kubeconfig --admin --state $KOPS_STATE_STORE --name=$CLUSTER_NAME
Also, you can watch the process of deploying the cluster:
kops validate cluster --wait 10m
Validating cluster eu-north-1.training.dx-book.com
INSTANCE GROUPS
NAME ROLE MACHINETYPE MIN MAX SUBNETS
master-eu-north-1a Master t3.large 1 1 eu-north-1a
master-eu-north-1b Master t3.large 1 1 eu-north-1b
master-eu-north-1c Master t3.large 1 1 eu-north-1c
nodes Node - - eu-north-1a,eu-north-1b,eu-north-1c
NODE STATUS
NAME ROLE READY
i-04ec95be5248be476 master True
i-064593b5a524945f3 node True
i-06f5041773a4d9365 master True
i-0d19c566ff828f590 node True
i-0e3df9a7691341e18 node True
i-0fa8482d6b0451712 master True
Your cluster eu-north-1.training.dx-book.com is ready
And check the nodes status
kubectl get nodes
NAME STATUS ROLES AGE VERSION
i-04ec95be5248be476 Ready control-plane 8m58s v1.25.11
i-06f5041773a4d9365 Ready control-plane 9m1s v1.25.11
i-0fa8482d6b0451712 Ready control-plane 8m50s v1.25.11
i-064593b5a524945f3 Ready node,spot-worker 7m27s v1.25.11
i-0d19c566ff828f590 Ready node,spot-worker 7m11s v1.25.11
i-0e3df9a7691341e18 Ready node,spot-worker 7m25s v1.25.11
See also other kOps cli options https://kops.sigs.k8s.io/cli/kops/ . Including the cluster deletion.
kops delete cluster --name $CLUSTER_NAME --yes