0% found this document useful (0 votes)
19 views10 pages

Kubernetes Architecture 1631845920

Kubernetes

Uploaded by

Pavan k
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views10 pages

Kubernetes Architecture 1631845920

Kubernetes

Uploaded by

Pavan k
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

KUBERNETES ARCHITECTURE

Gaurav Janjal
Content :
• A quick introduction to kubernetes
• Architecture
• Kubernetes Control plane

Components :
• Api server
• Scheduler
• Controller
• etcd
Introduction to kubernetes:
Kubernetes is a portable, extensible, open-source platform for managing
containerized workloads and services, that facilitates both declarative configuration
and automation.

The name Kubernetes originates from Greek, meaning helmsman or pilot. K8s as an
abbreviation results from counting the eight letters between the "K" and
The "s ”.

Written on golang, it has a huge community because it was first developed by Google
in 2014 and later donated to CNCF.

It gives you the freedom to take advantage of non-premises, hybrid, or public cloud
infrastructure, letting you move workloads to anywhere you want.
Kubernetes Control plane :
Kubernetes is made up of multiple master nodes, each master node runs its
master processes, where the api server is load balanced and etcd storage is
distributed across all master nodes.

Master nodes are important but they actually have less workload than worker
node, so they need less resources like cpu, RAM and storage etc, where as
worker nodes do the actual job of running those containers inside the pods
therefore they need more resources.
Kube api-server :
This api server interacts directly with users. (i.e we can apply yaml or json manifest
to kube-apiserver).

Kube api-server is meant to scale automatically as per load.

Kube api-server is frontend of control plane.

The Kubernetes API server validates and configures data for


the api objects which include pods, services, replication controllers, and others.
etcd :
Etcd stores metadata and status of cluster.

Etcd is consistent and high availability store (key value store)


tcd following feature.

Fully replicated. the entire state is available on every node in


the cluster

Secure, implement automatic TLS with optional client-certificate authentication.

Fast Benchmarked at 10000 write per second.


Robotics and automation, a control loop is a non-terminating loop that regulates the state of a system.

Here is one example of a control loop: a thermostat in a room

When you set the temperature, that's telling the thermostat about
your desired state. The actual room temperature is the current state. The thermostat acts to bring the
current state closer to the desired state, by turning equipment on or off.

In Kubernetes, controllers are control loops that watch the state of your cluster, then make or request
changes where needed. Each controller tries to move the current cluster state closer to the desired
state.

Controllers can track many objects including

What workloads are running and where

Resources available to those workloads

Policies around how the workloads behave (restart, upgrades, fault-tolerance)


kube-scheduler :
The Kubernetes scheduler is a control plane process which assigns Pods to Nodes.
The scheduler determines which Nodes are valid placements for each Pod in the
scheduling queue according to constraints and available resources. The scheduler
then ranks each valid Node and binds the Pod to a msuitable Node. Multiple
different schedulers may be used within a cluster; kube-scheduler is the reference
implementation.

In simple term, scheduling refers to making sure that Pods are matched to Nodes
so that the kubelet can run them.
What is static pod?
● A Kubernetes Pod is thoroughly managed by an API-SERVER. The API-SERVER is
responsible for observing and managing the application pods.
● On the other hand, a Static Pod is never in control of the API-SERVER. That is,
API-SERVER does not manage static pods, Kubelet on the worker nodes takes care
of them. Kubelet is responsible to restart the static pods and have a health check if
they fail.
● Kubelets create these static pods on the nodes and manage them. Though they are
not managed by API-SERVER, a kubelet creates a copy of these static pods on the
k8 API-SERVER. As a result, when we try to list the pods, static pods will also be
visible, but internally, the API server would have no control over this kind of pod.
● The best case of static pods is to have them create Kubernetes control plane
components. The kubeadm tool makes use of static pods to have the control plane
components (kube-scheduler, API server, etc) in the cluster.
Filesystem-hosted static Pod manifest

● We use the staticPodPath in the kubelet configuration file to make the pod
manifest file reside there.
● On a periodic basis, kubelet scans the directory and accordingly creates/deletes
static pods based on the configuration from the configuration files.
● In the manifest, we will create a file with a httpd to run as a static pod .We will
create a directory under the /etc/kubernetes/manifests tree to have the file.
Also, we need to make sure that the node has kubelet running on it for it to catch
the configuration to create a static pod.

You might also like