Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon

Installing and Testing the Components of a Kubernetes Cluster

In this lab, you will build a cluster from scratch, as well as test the components of the cluster (including the deployments, pods, port forwarding, and services) and execute a command from within a pod. In order to build the Kubernetes cluster, we need to install the container runtime, as well as kubeadm, kubectl, and kubelet. We will then initialize the cluster, add our CNI, and add the nodes to the cluster.

Google Cloud Platform icon

Path Info

Clock icon Intermediate
Clock icon 45m
Clock icon Mar 31, 2019

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Install a Three Node Cluster

    • Get the gpg keys for Docker and Kubernetes and add it to your repository
    • Install docker-ce, kubelet, kubeadm, and kubectl
    • Initialize the cluster with the pod CIDR address
    • Setup the local kubeconfig
    • Apply the Calico CNI plugin
    • Join the worker nodes to the cluster
  2. Challenge

    Create a Deployment

    • On the master node, create a deployment named ngnix, using the nginx image
  3. Challenge

    Expose Port 80 on the Pod

    • On the master node, forward the container port 80 to 8081
    • Open a new shell to the Kubernetes master and curl port 8081 on localhost
  4. Challenge

    Get the NGINX version running on the pod

    • In the original master node terminal, run the nginx -v command from inside the pod
  5. Challenge

    Create a service, and verify connectivity on the node port

    • In the original master node terminal, run the commands to expose the deployment and create a NodePort service
    • Get the name of the node that the pod resides on
    • Run the curl command to that node, using the port from the service, and verify connectivity

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

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.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans