Difficulty: beginner
Estimated Time: 30 minutes

U2U Kubernetes Lab

In this lab, you will set up your first Kubernetes cluster. You will learn about

  • Creating and Deploying Pods
  • Using kubectl and YAML files
  • Using Deployments for Scaling
  • Setting up communication with Services
  • Updating versions of your app

Before you start

The online terminal is a pre-configured Linux environment that can be used as a regular console (you can type commands). Clicking on the blocks of code will execute that command in the terminal.

You will use a sample node application called u2utraining/nodejs-http-server. you can find the docker image here The application consists out of a single container which is a node HTTP server, which responds with its version and the machine it's running on.

What you learned

  • Creating and Deploying Pods
  • Using kubectl and YAML files
  • Using Deployments for Scaling
  • Setting up communication with Services
  • Updating versions of your app

Well done. you deserve some coffee.

U2U Kubernetes Lab

Step 1 of 5

Step 1 - Getting Things Up and Running

If the server hasn't started yet, start the Kubernetes cluster with the following command:

minikube start

Minikube is a minimalistic Kubernetes implementation, which is great for learning. It is not meant to be used in production.

Wait until Kubernetes is done loading. Then use the following command to verify that kubectl is installed:

kubectl version

You should be able to see both the version of the client(kubectl version) as well as the server(Kubernetes version).

Let's take a look at the cluster itself. The following command should give you some basic information, like where the master is running.

kubectl cluster-info

Finally let's see how many nodes we have available:

kubectl get nodes

Just one for now. Notice the name, it sould be minikube or host01, these are aliases. You can use this name to talk to this node directly from within the cluster.

pod.yaml
deployment.yaml
service.yaml
This tab will not be visible to users and provides only information to help authors when creating content.

Creating Katacoda Scenarios

Thanks for creating Katacoda scenarios. This tab is designed to help you as an author have quick access the information you need when creating scenarios.

Here are some useful links to get you started.

Running Katacoda Workshops

If you are planning to use Katacoda for workshops, please contact [email protected] to arrange capacity.

Debugging Scenarios

Below is the response from any background scripts run or files uploaded. This stream can aid debugging scenarios.

If you still need assistance, please contact [email protected]