01_Kubernetes
01_Kubernetes
0
Roadmap
1
From Borg to Kubernetes
2
Kubernetes
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
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
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.
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.
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.
▪ and deadlines.
16
Control Plane Components → kube-controller-manager
▪ 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
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.
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
23
Kubernetes Entities
24
Questions?
25
References
▪ github.com/kubernetes/kubernetes
▪ kubernetes.io/docs/concepts/overview/components/
26