0% found this document useful (0 votes)
4 views

01_Kubernetes

The document outlines the Kubernetes system, an open-source platform for managing containerized applications, developed by Google in 2014 as an evolution of its internal system, Borg. It highlights Kubernetes' key features such as automation, failover, and centralized logging, which enhance deployment efficiency and resource utilization. Additionally, it details the architecture of Kubernetes, including its components like clusters, nodes, and control plane elements, as well as the various entities involved in its operation.

Uploaded by

shailendrjain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

01_Kubernetes

The document outlines the Kubernetes system, an open-source platform for managing containerized applications, developed by Google in 2014 as an evolution of its internal system, Borg. It highlights Kubernetes' key features such as automation, failover, and centralized logging, which enhance deployment efficiency and resource utilization. Additionally, it details the architecture of Kubernetes, including its components like clusters, nodes, and control plane elements, as well as the various entities involved in its operation.

Uploaded by

shailendrjain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Kubernetes

0
Roadmap

1. Kubernetes 9. Labels and Annotations


2. Cluster 10. ReplicaSets

3. API 11. Deployments


4. YAML 12. Services
5. Namespaces 13. ConfigMaps
6. Pods 14. Secrets
7. Object Management 15. Volumes
8. Resource Management

1
From Borg to Kubernetes

▪ Google developed the internal container orchestration system it named Borg.


▪ Borg is tightly coupled to Google’s own internal and proprietary technologies, difficult to
extend, and impossible to release to the public.
▪ In 2014, Google founded an open source project named Kubernetes (from the Greek word
κυβερνήτης, meaning “helmsman, pilot”).

2
Kubernetes

As you read from its Github page:


Kubernetes is an open-source system for managing containerized applications across multiple
hosts. It provides basic mechanisms for deployment, maintenance, and scaling of applications.

Popular numeronym (number-based word):

k8s = k[ubernete]s
12345678

3
What Makes Kubernetes So Valuable?

Kubernetes does the things that the very best system administrator would do:
▪ automation

▪ failover
▪ centralized logging
▪ monitoring
Some of these features are built into the Kubernetes core; others are provided by add-ons,
extensions, and third-party tools that use the Kubernetes API.

4
Kubernetes Makes Deployment Easy

▪ Kubernetes greatly reduces the time and effort it takes to deploy


▪ Kubernetes also provides facilities to help you implement continuous deployment
practices
▪ Kubernetes supports autoscaling
▪ Kubernetes has redundancy and failover built in

5
Kubernetes and Business

▪ Kubernetes cuts infrastructure costs and makes much better use of a given set of
resources
▪ Kubernetes takes that wasted capacity and uses it to run workloads, so you can achieve a
much higher utilization of your machines

▪ Kubernetes provides a lot of things out of the box: you get scaling, load balancing, and
failover for free

6
Kubernetes Doesn’t Do It All

▪ Running stateful applications (e.g. databases) requires a large investment of time and
engineering
▪ Cloud functions and funtainers don’t actually need Kubernetes, and can run on what are
sometimes called serverless platforms

▪ Kubernetes fits best for microservices, yet it’s still possible to run monolithic applications in
the cloud, using containers

7
Kubernetes Architecture

▪ Components
▪ Entities

8
Kubernetes Components

9
Cluster

When you deploy Kubernetes, you get a cluster.

A cluster is a collection of compute, storage, and networking resources that Kubernetes uses
to run the various workloads that comprise your system.

Note that your entire system may consist of multiple clusters (federation).

10
Node

A Kubernetes cluster consists of a set of worker machines, called nodes, that run
containerized applications. Every cluster has at least one worker node.

A node is a single host. It may be a physical or virtual machine.

A node's job is to run:


▪ Pods
▪ Kubernetes components (kubelet, kube proxy)

11
Pod

The worker node(s) host the Pods that are the components of the application workload.

12
Control Plane Components

The control plane's components make global decisions about the cluster, as well as detecting
and responding to cluster events.

They consist of:


▪ kube-apiserver
▪ etcd
▪ kube-scheduler
▪ kube-controller-manager
▪ cloud-controller-manager

13
Control Plane Components → kube-apiserver

The kube-apiserver is a component of the Kubernetes control plane that exposes the
Kubernetes API.

The API server is the front end for the Kubernetes control plane. All requests are passed
through the API server.

kube-apiserver is designed to scale horizontally. You can run several instances of kube-
apiserver and balance traffic between those instances.

14
Control Plane Components → etcd

Consistent and highly-available key-value store used as Kubernetes' backing store for all
cluster data.

If your Kubernetes cluster uses etcd as its backing store, make sure you have a back up plan
for this data.

15
Control Plane Components → kube-scheduler

kube-scheduler watches for newly created Pods with no assigned node and selects a node
for them to run on.

Factors considered for scheduling decisions include:


▪ individual and collective resource requirements
▪ hardware/software/policy constraints
▪ affinity and anti-affinity specifications
▪ data locality
▪ inter-workload interference

▪ and deadlines.

16
Control Plane Components → kube-controller-manager

kube-controller-manager runs controller processes:


▪ Node controller: Responsible for noticing and responding when nodes go down.

▪ Replication controller: Responsible for maintaining the correct number of pods for every
replication controller object in the system.
▪ Endpoints controller: Populates the Endpoints object (that is, joins Services & Pods).
▪ Service Account & Token controllers: Create default accounts and API access tokens for
new namespaces.

17
Control Plane Components → cloud-controller-manager

cloud-controller-manager embeds cloud-specific control logic. The cloud controller


manager lets you link your cluster into your cloud provider's API, and separates out the
components that interact with that cloud platform from components that just interact with
your cluster.

If you are running Kubernetes on your own premises, or in a learning environment inside
your own PC, the cluster does not have a cloud controller manager.

18
Node Components

Node components run on every node, maintaining running pods and providing the
Kubernetes runtime environment.

There are the following node components:


▪ kubelet
▪ kube-proxy
▪ container runtime

19
Node Components → kubelet

An agent that runs on each node in the cluster. It makes sure that containers are running in a
Pod.

The kubelet takes a set of PodSpecs that are provided through various mechanisms and
ensures that the containers described in those PodSpecs are running and healthy.

The kubelet doesn't manage containers which were not created by Kubernetes.

20
Node Components → kube-proxy

kube-proxy is a network proxy that runs on each node in your cluster, implementing part of
the Kubernetes Service concept.

kube-proxy maintains network rules on nodes. These network rules allow network
communication to your Pods from network sessions inside or outside of your cluster.

kube-proxy uses the operating system packet filtering layer if there is one and it's available.
Otherwise, kube-proxy forwards the traffic itself.

21
Node Components → Container Runtime

The container runtime is the software that is responsible for running containers.

Kubernetes supports several container runtimes: Docker, containerd, CRI-O, and any
implementation of the Kubernetes CRI (Container Runtime Interface).

22
Addons

Addons use Kubernetes resources (DaemonSet, Deployment, etc.) to implement cluster


features.

There are selected addons:


▪ DNS
▪ Web UI (Dashboard)
▪ Container Resource Monitoring
▪ Cluster-level Logging

23
Kubernetes Entities

There are more than 50 entities.

We will learn the essentials ones:


▪ Namespaces
▪ Pods, ReplicaSets, Deployments
▪ Labels, Annotations
▪ Services, Endpoints
▪ ConfigMaps, Secrets
▪ Volumes

24
Questions?

25
References

▪ github.com/kubernetes/kubernetes
▪ kubernetes.io/docs/concepts/overview/components/

▪ Large-scale cluster management at Google with Borg

26

You might also like