Вы находитесь на странице: 1из 17

The Big Picture

What is Kubernetes?
• Kubernetes (K8s) is an open-source system for automating
deployment, scaling, and management of containerized
applications.
• Kubernetes is a Container Orchestrator, that abstracts the
underlying infrastructure, where the containers are run by
providing us with a simple API to which we can send requests.
Those requests prompt Kubernetes to meet them at its best of
capabilities. For example, it is as simple as requesting “Kubernetes
spin up 4 containers of the image x”. Then Kubernetes will find
under-utilized nodes in which it will spin up the new containers.
• Developer doesn’t have to care about the number of nodes,
where containers are started and how they communicate. He
doesn’t deal with hardware optimization or worry about nodes
going down because new nodes can be added to the Kubernetes
cluster. In the meantime Kubernetes will spin up the containers in
the other nodes that are still running. It does this at the best
possible capabilities.
• Standardizing CSPs
A little history and
background..
• Borg -> Omega -> Kubernetes
• Google has been running billions of containers every week to
support their production load since more than 15 years but it
was in 2014 that they open sourced it.
• Now it is hosted and maintained by Cloud Native Computing
Foundation which is a Linux Foundation Project and they host
many other projects like gRPC, Prometheus, etc
• Google still uses its Borg system internally and most of the
innovations and features of the evolved Omega and Kubernetes
have been incorporated in Borg.
Service Discovery and Load Balancing - Kubernetes gives containers their
own IP addresses and a single DNS name for a set of containers, and can
load-balance across them

Storage Orchestration - Automatically mount the storage system of your


choice - local storage, a public cloud provider or a network storage system

Some Salient Automated rollouts and rollbacks – Rolling Updates – Zero Downtime
Features
Self-healing - Restarts containers that fail, replaces and reschedules
containers when nodes die, kills containers that don’t respond to your user-
defined health check, and doesn’t advertise them to clients until they are
ready to serve

Horizontal Scaling - auto scale also possible using Horizontal Pod Auto Scaler
node – a physical server or a VM, a worker
machine in Kubernetes, has node components
kubelet, kube-proxy, container runtime

pod – smallest deployable compute unit; pods


need nodes to exist
Pods & Nodes • Each pod has a unique IP address in the Kubernetes
cluster
• Pod can have multiple containers. The containers share
the same port space, as such they can communicate via
localhost (understandably they cannot use the same
port), and communicating with containers of the other
pods has to be done in conjunction with the pod ip.
• Containers in a pod share the same volume(enable by
Kubernetes), same ip, port space, IPC namespace.
Pods & Nodes
Kubernetes Components
Master Components
Master Node
• kube-apiserver - component on the master that exposes the Kubernetes
API
• etcd - Consistent and highly-available key value store used as Kubernetes’
backing store for all cluster data.
• kube-scheduler - Component on the master that watches newly created
pods that have no node assigned, and selects a node for them to run on.
• kube-controller-manager - Component on the master that runs controllers.
These controllers include:
• 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.
• etc
Other Jargon
• cluster – is a set of loosely or tightly connected computers that work together so that, in
many respects, they can be viewed as a single system
• node – a physical server or a VM, a worker machine in Kubernetes
• container - standard unit of software that packages up code and all its dependencies so
the application runs quickly and reliably from one computing environment to another
• orchestration - is the automated configuration, coordination, and management of
computer systems and software
• kubectl - command line interface for running commands against Kubernetes clusters
• minikube – developer tool to run Kubernetes locally, runs a single-node Kubernetes
cluster inside a VM on your laptop
• kubelet - a process responsible for communication between the Kubernetes Master and
the Node; it manages the Pods and the containers running on a machine
• kube-dns – special pod, by default, all pods use it as DNS server
How it
works?
Example
Example
Example
Some params -
• Kind : kind of kubernetes resource, eg pod, service, deployment
• MaxUnavailable : property of the RollingUpdate object that specifies the
maximum unavailable pods allowed (compared to the desired state) when doing
a rolling update. For our deployment which has 3 replicas this means that after
terminating one Pod, we would still have two pods running, this way keeping our
application accessible.
• MaxSurge is another property of the RollingUpdate object that defines the
maximum amount of pods added to a deployment (compared to the desired
state). For our deployment, this means that when moving to a new version we
can add one pod, which adds up to 4 pods at the same time.
• app: the label to use for the pods created by this template – LB will need this
label
• ImagePullPolicy : when set to Always, it will pull the container images on each
redeployment
Competing Docker Apache
Technologies
Swarm Mesos
https://kubernetes.io/

https://medium.freecodecamp.org/learn-kubernetes-in-under-3-hours-a-detailed-guide-to-
orchestrating-containers-114ff420e882

https://en.wikipedia.org/wiki/Kubernetes

https://en.wikipedia.org/wiki/Linux_Foundation#Cloud_Native_Computing_Foundation

https://en.wikipedia.org/wiki/LXC
Resources
https://ai.google/research/pubs/pub43438

https://en.wikipedia.org/wiki/Orchestration_(computing)

https://queue.acm.org/detail.cfm?id=2898444
Thank You

Вам также может понравиться