K8s Cluster Setup
SUDO Privilege's are required
Privileged access to your Ubuntu System via sudo command is required
Switch to Bash Shell
bashVerify the SUDO Privileges
sudo apt update -yConfigure Hostname
On Master Node run the below Command
sudo hostname masterOn Worker Node 1 run the below Command
sudo hostname worker1On Worker Node 2 run the below Command
sudo hostname worker2Clone 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
You need to ensure that NO_PROXY should have your local Network configured, so that local requests to your network are not forwarded to proxy, rather they are sent directly to destination system in the Network
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
You need to ensure that NO_PROXY should have your local Network configured, so that local requests to your network are not forwarded to proxy, rather they are sent directly to destination system in the Network
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.
Step 9: Pull the Busybox Image, to verify weather docker deamon is able to download or not
perform docker login
In Case if you get a permission error. Please logout of the machine and login again.
If there is an issue, then inform 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.
Append "sudo" to the above command while pasting it on Worker Node.
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
Congrats ! If you see the list of nodes, then you have successfully configured the Kubernetes Cluster
Last updated
Was this helpful?