Create a Cluster Using kubectl

30 minutes
  • 5 Learning Objectives

About this Hands-on Lab

In this lab, you will be provided two servers. They have been partially configured for use with Kubernetes and containerd. You will need to initialize a Kubernetes cluster, add a network plugin, and add a Node to the cluster.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Log In to the Provided Servers

Log in to the servers as cloud_user with the provided password to ensure you can log in. When the file SERVER-READY is shown in the /home/cloud_user folder, then you can follow along with the tasks.

Initialize the Cluster and Set Up Your User
  • Use the relevant command to initialize the cluster. The network you should use is 172.16.0.0/16.

  • To set up your user, you will need to use the information output from the kubeadm init command that was run previously.

Add a Network Plugin for Use

Apply the network plugin called Calico. The URL to use is
https://raw.githubusercontent.com/projectcalico/calico/v3.25.0/manifests/calico.yaml.

Add the Worker Node to the Cluster

Add your worker node to the cluster. You will need to use the information output from the kubeadm init command that was run previously.

Test the Worker Node Has Been Added

Test the worker Node has been added. You can use the kubectl get nodes command.

Additional Resources

Scenario

You have been tasked by your manager to learn more about Kubernetes and its cluster abilities.

You have two servers that are available for testing, and they have been partially configured. Your task is to finish the configuration and create a cluster with one Node.

You will need to initialize the cluster on the kcontrol server. Then, you will need to add the Calico network plugin.

You will then need to add the other server to the Kubernetes control server.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?