All about Kubernetes

Megha Poojari
McKinley & Rice
Published in
4 min readFeb 22, 2021

Kubernetes is an open-source platform for automating the management, deployment and scaling of containerized applications.

A typical setup involves multiple nodes in a Kubernetes Cluster, with one master node and the other being the worker nodes.

But that doesn’t necessarily mean you need to have multiple virtual machines at your end to deploy a Kubernetes Cluster for self-learning or simple development purposes.

So, here we will now explore how we can set up a simple Kubernetes Cluster using kubeadm on your Local Machine- which would be the master node, and deploy a simple application on top of it.

Setting Up Kubernetes

1. Kubernetes is based on Containerized technology. So, as we know the best-containerized technology out there is docker. So let's install docker first.

2. Lets now install the apt-transport-https package and curl

3. Add the Kubernetes Signing Key

4. Now, let us add the Kubernetes package repository.

5. Install Kubernetes

6. Disable Swap Memory

7. Now, comment out the /swapfile line in the /etc/fstab and save the file.

8. Now, initialize the Kubernetes node.

9. Run the below three commands

10. Deploy a Flannel pod network.

11. Verify that all the pods are up and running

12. Now, since we are not having multiple nodes and the plan is to only have one node, we need to taint the master node so that pods can be deployed here.

Deploy a Simple Nginx Web Server

  1. Create Deployment named Nginx with the Nginx image

2. Check the state of the Deployment

3. So, now we have an Nginx application running in a pod because of the deployment we created. We can see the pod IP with the following command.

4. Now, if we hit the pod IP in the browser we can see the Nginx web server page.

Finally, we have set up a simple Kubernetes cluster and deployed an app on top of it.

You can play around and explore all the awesome features of Kubernetes now.

McKinley & Rice are pioneers in providing top-notch services for businesses across the globe. We help businesses grow and expand in your home country and foreign markets! We provide tech solutions to every business and we are damn good at what we do!

If you are looking for customized software development or website designing or mobile application development for your business, get in touch with our experts today!

You can get in contact with us here!

--

--