Kubernetes Web Application

Srasthy Chaudhary
3 min readSep 6, 2021

WHAT IS KUBERNETES?

Kubernetes is an open-source container orchestration platform that helps manage distributed, containerized applications at a massive scale.

You tell Kubernetes where you want your software to run, and the platform takes care of virtually everything else.

Kubernetes provides a unified application programming interface (API) to deploy web applications, batch jobs, and databases. Applications in Kubernetes are packaged in containers and are cleanly decoupled from their environment. Kubernetes automates the configuration of your applications and maintains and tracks resource allocation.

THE BENEFITS OF KUBERNETES

Scalability- Kubernetes automatically scales your cluster based on your needs, saving you resources and money

Portability- Kubernetes can run anywhere. It runs on-site in your own datacenter, or in a public cloud. It also runs in a hybrid configuration of both public and private instances. With Kubernetes, the same commands can be used anywhere.

Consistent deployments- Kubernetes deployments are consistent across the infrastructure. Containers embody the concept of immutable infrastructure, and all the dependencies and setup instructions required to run an application are bundled with the container.

Separated and automated operations and development- It is common for operations and development teams to be in contention. Operations teams value stability and are more conservative about change. Development teams value innovation and prize a high change velocity. Kubernetes resolves this conflict.

BASIC KUBERNETES ARCHITECTURE

Kubernetes is a mature platform consisting of hundreds of components.

Kubernetes is software for managing containerized applications on a cluster of servers. These servers are either master or worker nodes. Together they run applications or services.

Control Plane:

The control plane acts as the brain of any Kubernetes cluster. Scheduling, service discovery, load balancing, and resource management capabilities are all provided by the control plane.

API server:

Kubernetes’ API server is the point of contact for any application or service. Any internal or external request goes to the API server. The server determines if the request is valid and forwards the request if the requester has the right level of access.

etcd:

If the control plane is the brain, then etcd is where memories are stored. A Kubernetes server without etcd is like a brain that cannot make memories. As a fault-tolerant, inherently distributed key-value store, etcd is a critical component of Kubernetes. It acts as the ultimate source of truth for any cluster, storing cluster state, and configuration.

Worker nodes:

A worker node in Kubernetes runs an application or service. There are many worker nodes in a cluster, and adding new nodes is how you scale Kubernetes.

Kubelet:

A kubelet is a tiny application that lives on every worker node. The kubelet communicates with the control plane and then performs requested actions on the worker node.

If the control plane is like a brain, a kubelet is like an arm. The control plane sends the command, and the kubelet executes the action.

Container runtime engine:

The container runtime, which complies with standards managed by Open Container Initiative (otherwise known as the OCI specification), runs containerized applications. It is the conduit between a portable container and the underlying Linux kernel.

The frontend(kub.html) and backend(app.py) code is uploaded here:

https://github.com/srasthychaudhary/K8S-WebApp

Final Output

--

--