DEV Community

Cover image for Kubernetes for beginners: Where do I start?
Muzammil
Muzammil

Posted on

Kubernetes for beginners: Where do I start?

Being developers, we get zoned out in those standup calls when the server admins take over and flaunt their container orchestration skills. Let's take over and it's our time to shine now.

What is Kubernetes though?

We have been hearing a lot about containers and how they've been streamlining the way a development lifecycle works. Not getting deep into containers in this post, you can have a look into this. When our applications become bigger or if we are getting into making it modular, multiple containers come into play. Here's where things get tricky. For example, if we are running an e-commerce application - our auth/login, payment services, product catalogues, inventory management will run as individual containers or services - this is the microservices approach. Say if we are running the application using a Docker engine, we never know when a container goes down or when to scale up a container. We wouldn't have any clue when our social media campaign clicks and there is a good amount of rapid traffic hitting our services. Imagine if we got a black Friday sale going on and my services running are taking longer than usual to respond - Docker engine turns a bling eye 😧. What if my payment service goes down? 😟 - It would be chaos.

Enter Kubernetes 😎 !!! - the open-source container orchestration platform. Now, we have it covered, Kubernetes does the auto-scaling for our pods in which our containers run. It does anything and everything to keep all the services up and running without the mess unravelling on the Black Friday sale with so much ease.

When do I need to use Kubernetes?

As long as we're going with a multi-container application, Kubernetes is a yes. If we're adopting microservices architecture for the same - we got to be going with Kubernetes.

Some of us would be asking this - "Hold up mate...But most of the applications I run are just React / Angular applications as a side hustle, do I need to containerize and go with Kubernetes ?" Short answer: A big no. Setting up a Kubernetes cluster is a lengthy task if we are not going with a cloud-managed Kubernetes service like AWS EKS.

Kubernetes glossary

Cluster
A Kubernetes cluster is a set of nodes that provisions us to run the containerized application. It enables us to run applications across multiple machines and environments but helps us manage them under a single window

Pod
Pods are the smallest unit in Kubernetes. They can just be called a wrapper to the containers we run - a shell that encloses our application. We can scale up and down the number of pods which is similar to altering the number of instances of a deployed application.

Nodes
Nodes are physical or virtual machines where the pods are run. Ideally, Kubernetes sets up one master node and multiple worker nodes where the pods are run. The master node as its name says has a control plane which is the decision-maker in a cluster - it decides which nodes should the pods run.

Deployments
Deployments are a familiar term for us - yes, they are the same. They provide the configuration for the pods and the containers which are to be managed. We got two approaches to make a deployment - using the CLI (Imperative approach) and using a YAML file (Declarative approach). I prefer the latter approach to have the configurations documented.

What next ?

  • Start with a practical guide that goes according to your pace. This one here on Udemy would be a good kickstart if you're starting right away from containers.

  • Start playing around with minikube, which is a single node cluster setup to learn the concepts of Kubernetes in our local environment.

  • This write up is minuscule than the tip of the iceberg. There's nothing more precise than the official Kubernetes documentation where they provide a practical lab to understand the concepts.

  • As the cloud has made up our lives easier, it's no more a deal starting up a cluster and managing the orchestration of pods. Cloud-managed Kubernetes services have taken the burden of setting up things. It's high time we have a look at popular Kubernetes managed services like AWS EKS, Azure Kubernetes Service, IBM Cloud Kubernetes service based on our preferences.

  • Last but not least, remain consistent in learning Kubernetes. It's a steep learning curve out there but with a slight focus on things makes things a lot easier. 😃

Discussion (0)