K8s Cluster Setup

SUDO Privilege's are required

Privileged access to your Ubuntu System via sudo command is required

Switch to Bash Shell

bash

Verify the SUDO Privileges

sudo apt update -y

Configure Hostname

On Master Node run the below Command

sudo hostname master

On Worker Node 1 run the below Command

sudo hostname worker1

On Worker Node 2 run the below Command

sudo hostname worker2

Clone Training files

Clone the code repository created for this training on all the master and worker Nodes

Step 1: Clone the repository

Step 2: Switch the directory to GettingStarted folder

Step 3: Enable Executable permissions

Run the above commands on all the servers

Docker Installation - Master Node

Run the Below Command to Install Docker on master node

Logout from the console and login again before you go to next step

Docker Installation - Worker Nodes

Run the Below Command to Install Docker on all worker node

Logout from the console and login again before you go to next step

Perform Docker Login

Run the below commands to do docker login.

Proxy Configuration - Micro focus Environment

Perform all the below Proxy Configuration Operations on Master Node and Worker Node

Switch to Bash Shell

Step 1: Create a systemd drop-in directory for the docker service:

Step 2: Create a file called /etc/systemd/system/docker.service.d/http-proxy.conf and add the HTTP_PROXY and HTTPS_PROXY environment variable.

Note : Use Nano Editor for adding the below lines to the above http-proxy.conf file. You can also use any other editor

To Save the File use : Ctrl + X then type "y" then Enter

Step 3: Create a systemd drop-in directory for the containerd service:

Step 4: Create a file called /etc/systemd/system/containerd.service.d/http-proxy.conf and add the HTTP_PROXY and HTTPS_PROXY environment variable.

Note : Use Nano Editor for adding the below lines to the above http-proxy.conf file. You can also use any other editor

To Save the File use : Ctrl + X then type "y" then Enter

Step 5: Append the Proxy Value is as below to /etc/environment file

append the below line of configuration

To Save the File use : Ctrl + X then type "y" then Enter

Step 6: use systemd as the default driver for docker.

Step 7: Flush changes

Step 8: Verify that the configuration has been loaded. Observe the Output

The above command output should return Proxy Environmental Variables that we have configured before.

Press Q to exit from the above command

If you see proxy Environmental Variables in the output, then Goto Step 9.

If you don't observe Proxy Environment Variables, then discuss with your Instructor 😢

Step 9: Pull the Busybox Image, to verify weather docker deamon is able to download or not

perform docker login

If the Step 9 is successful, then good and wait for the Next Instructor Commands

Now its to go back and install kubernetes. But before you do that confirm with Instructor

Kubernetes Installation - Master Node Installation

Move to the cloned repository

Please observe the output from the above command constantly till it ends.

Kubernetes Installation - Worker Nodes Installation

Move to the cloned repository

You need to run these below commands on both Worker Nodes

Join Worker Nodes to Master Nodes

On Master Node : Run the following Command

Copy the Output of the above command and run that output command on Worker Nodes.

On Worker Nodes : Run the following Command

The below is a sample command. Please use the command that you got from your Kubernetes Master Server

On Master Node : Run the Below Command

Last updated

Was this helpful?