Ingress and Ingress controllers

Image for post
Image for post
Photo by Scott Graham on Unsplash

We have always used Cloud LoadBalancer to expose our service to the outside world. Let’s see how we can optimize our Kubernetes service using an Ingress Controller.


An Ingress is a more customizable way to expose our traffic than using a traditional Cloud LoadBalancer.For …

1: Create a three-node Kubernetes cluster
2: Create Dynamic, persistent volume claim
3: Deploy MySQL and WordPress Pods
4: Test Data Persistent on Pod Failure

Things to keep in mind
1: Deployment are designed for stateless applications
2: When using persistent disk you can only run a single pod

Image for post
Image for post

To get started we will first create a Directory for our project to work

mkdir k8s-wordpress && cd k8s-wordpress

Now we will require some storage to work with so we will create Persistent volume claim for our MySQL pod
create a .yaml file for it

Here we are just making a claim for 200GB Volume in Read-write mode
The volume will be provisioned first, and then it will be claimed by our MySQL pod
Now we can create deployment file for our MySQL…

You may think that these two things don’t go together. Let me explain

Image for post
Image for post

After reading this title, you must be thinking about how you can put two different things together, which do not seem to fit together at all like serverless and Kubernetes.

First, let us clarify.

What Do We Mean by Serverless?

At a high level, serverless is just a deployment method that completely abstracts the servers away.

A developer just wants to write their application code, press a button, and get their application served without planning a deployment, setting up the auto-scaling, or any other complex infrastructure tasks.

For some use cases, it is arguably more developer-friendly that regular old Kubernetes. …

A look inside the cluster

Image for post
Image for post

A typical Kubernetes cluster will contain:

  1. One or more master nodes.
  2. One or more nodes.

Again, these are just a common variety of computers. Sometimes they may be large physical servers, and sometimes they can even be Raspberry Pis. But in the case of Google’s Kubernetes engine and the Elastic Kubernetes service, they are virtual machines.

Master Node

Masters run several components that provide us with something called a control plane. They make decisions about the cluster, such as where to schedule specific workloads, etc.

The Master is responsible for the state of the cluster. It continually keeps an eye on everything to make sure that everything is working fine. …

Now many things in our lives don’t make any sense. Such is the case with Docker too.
There are a lot of concepts involved in its architecture.
Have you ever wondered what happens behind the terminal when you type the Docker commands in it like, e.g.: docker pull <name of the image> or
docker run-it <name of the image>.
Well if you have and want to find all the answer to it, I request you to plug in your seat belts and be ready to go on a short ride.

Prerequisite: Well there is no defined prerequisite to learn new things but if you have some basic idea of the docker, e.g. basic docker commands like push-pull etc. …

What’s the difference?

Image for post
Image for post

I used to think of Docker containers as lightweight, trimmed-down virtual machines. The comparison made sense because, at least in the initial marketing of Docker, it was always compared to virtual machines — for example, “Docker takes less time to spin up than VM,” and so on.

But docker containers are not virtual machines.

Let’s do a side-by-side comparison of the Docker container and virtual machines.

Virtual Machines

Virtual machines (VMs) are an abstraction of physical hardware that turns one server into many. The hypervisor allows multiple VMs to run on a single machine. …

Docker has been the most popular tool to be used in the development world.

Image for post
Image for post
Image by

Docker helps solo developers and large teams to deploy one server to large enterprise organizations to deploy sophisticated web application consisting of 10s or 100s of microservices.

Now the question is, why do solo developers or large organizations use docker?

There are three main reasons to use docker.
1. Time and Money
Docker helps you isolate the app from each other for example consider you have 12 apps each having their own dependencies each written in different programming language and now you to test each app what you commonly do you would spin up a Virtual Machine and then install all the dependencies that are required by the app and after installing all the dependencies you would finally test the app.
This process is very time consuming and requires a lot of patience. Now imagine doing this for all the 12 apps that you have. This results in a lot of waste of computing resources and Money that is consumed by the virtual machine. …

Vivek Sonar

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store