Search⌘ K

Creating a Cluster: Running and Verification

Explore the process of creating a Kubernetes cluster with kOps by setting up nodes, defining zones, and specifying version details. Understand how to verify cluster status using kubectl and kOps validate commands to ensure all nodes are ready in a production environment.

We'll cover the following...

Creating the cluster

The command that creates a cluster using the specifications we discussed is as follows:

Shell
kops create cluster \
--name $NAME \
--master-count 3 \
--node-count 1 \
--node-size t2.small \
--master-size t2.small \
--zones $ZONES \
--master-zones $ZONES \
--ssh-public-key devops23.pub \
--networking kubenet \
--kubernetes-version v1.14.8 \
--yes
  • Line 3: We specify that the cluster should have three primary nodes and one worker node. Remember, we can always increase the number of workers, so there’s no need to start with more than what we need at the moment.

  • Lines 5–8: The sizes of both worker and primary nodes are set to t2.small. Both types of nodes will be spread across the three availability zones we specified through the environment variable ZONES.

  • Lines 9–10: We define the public key and the type of networking as discussed earlier.

  • Line 11: We use ...