SlideShare a Scribd company logo
1 of 67
Download to read offline
Kubernetes
A comprehensive Overview
Kubernetes v1.8
Agenda
โ— Introduction
โ—‹ Who am I?
โ—‹ What is Kubernetes?
โ—‹ What does Kubernetes do?
โ— Architecture
โ—‹ Master Components
โ—‹ Node Components
โ—‹ Additional Services
โ—‹ Networking
โ— Concepts
โ—‹ Core
โ—‹ Workloads
โ—‹ Network
โ—‹ Storage
โ—‹ Configuration
โ—‹ Auth and Identity
โ— Behind the Scenes
โ—‹ Deployment from Beginning to End
Introduction
Intro - Who am I?
Bob Killen / rkillen@umich.edu
Twitter / Github: @mrbobbytables
Senior Research Cloud Administrator @ ARC-TS
http://arc-ts.umich.edu
Intro - What is Kubernetes?
Kubernetes or K8s was a project spun out of Google as a open source
next-gen container scheduler designed with the lessons learned from
developing and managing Borg and Omega.
Kubernetes was designed from the ground-up as a loosely coupled collection
of components centered around deploying, maintaining, and scaling
applications.
Intro - What Does Kubernetes do?
Kubernetes is the linux kernel of distributed systems.
It abstracts away the underlying hardware of the nodes and provides a
uniform interface for applications to be both deployed and consume the
shared pool of resources.
Kubernetes
Architecture
Architecture Overview
Masters - Acts as the primary control plane for Kubernetes. Masters are
responsible at a minimum for running the API Server, scheduler, and cluster
controller. They commonly also manage storing cluster state, cloud-provider
specific components and other cluster essential services.
Nodes - Are the โ€˜workersโ€™ of a Kubernetes cluster. They run a minimal agent
that manages the node itself, and are tasked with executing workloads as
designated by the master.
Architecture
Overview
Master
Components
Master Components
โ— Kube-apiserver
โ— Etcd
โ— Kube-controller-manager
โ— Cloud-controller-manager
โ— Kube-scheduler
kube-apiserver
The apiserver provides a forward facing REST interface into the kubernetes
control plane and datastore. All clients, including nodes, users and other
applications interact with kubernetes strictly through the API Server.
It is the true core of Kubernetes acting as the gatekeeper to the cluster by
handling authentication and authorization, request validation and mutation,
admission control in addition to being the front-end to the backing datastore.
etcd
Etcd acts as the cluster datastore; providing a strong, consistent and highly
available key-value store used for persisting cluster state.
kube-controller-manager
The controller-manager is the primary daemon that manages all core
component control loops. It monitors the cluster state via the apiserver and
steers the cluster towards the desired state.
List of core controllers:
https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-controller-manager/app/controllermanager.go#L332
kube-scheduler
Kube-scheduler is a verbose policy-rich engine that evaluates workload
requirements and attempts to place it on a matching resource. These
requirements can include such things as general hardware reqs, affinity,
anti-affinity, and other custom resource requirements.
cloud-controller-manager
The cloud-controller-manager is a daemon that provides cloud-provider
specific knowledge and integration capability into the core control loop of
Kubernetes. The controllers include Node, Route, Service, and add an
additional controller to handle PersistentVolumeLabels .
Node
Components
Node Components
โ— Kubelet
โ— Kube-proxy
โ— Container runtime engine
kubelet
Acts as the node agent responsible for managing pod lifecycle on its host.
Kubelet understands YAML container manifests that it can read from several
sources:
โ— File path
โ— HTTP Endpoint
โ— Etcd watch acting on any changes
โ— HTTP Server mode accepting container manifests over a simple API.
kube-proxy
Manages the network rules on each node and performs connection
forwarding or load balancing for Kubernetes cluster services.
Available Proxy Modes:
โ— Userspace
โ— iptables
โ— ipvs (alpha in 1.8)
Container Runtime
With respect to Kubernetes, A container runtime is a CRI (Container Runtime Interface)
compatible application that executes and manages containers.
โ— Containerd (docker)
โ— Cri-o
โ— Rkt
โ— Kata (formerly clear and hyper)
โ— Virtlet (VM CRI compatible runtime)
Additional Services
Kube-dns - Provides cluster wide DNS Services. Services are resolvable to
<service>.<namespace>.svc.cluster.local.
Heapster - Metrics Collector for kubernetes cluster, used by some resources
such as the Horizontal Pod Autoscaler. (required for kubedashboard metrics)
Kube-dashboard - A general purpose web based UI for kubernetes.
Networking
Networking - Fundamental Rules
1) All Pods can communicate with all other Pods without NAT
2) All nodes can communicate with all Pods (and vice-versa) without NAT.
3) The IP that a Pod sees itself as is the same IP that others see it as.
Networking - Fundamentals Applied
Containers within a pod exist within the same network namespace and share
an IP; allowing for interpod communication over localhost.
Pods are given a cluster unique IP for the duration of its lifecycle, but the pods
themselves are fundamentally ephemeral.
Services are given a persistent cluster unique IP that spans the Pods lifecycle.
External Connectivity is generally handed by an integrated cloud provider or
other external entity (load balancer)
Networking - CNI
Networking within Kubernetes is plumbed via the Container Network
Interface (CNI), an interface between a container runtime and a network
implementation plugin.
Compatible CNI Network Plugins:
โ— Calico
โ— Cillium
โ— Contiv
โ— Contrail
โ— Flannel
โ— GCE
โ— kube-router
โ— Multus
โ— OpenVSwitch
โ— OVN
โ— Romana
โ— Weave
Kubernetes
Concepts
Kubernetes Concepts - Core
Cluster - A collection of hosts that aggregate their available resources including cpu, ram, disk,
and their devices into a usable pool.
Master - The master(s) represent a collection of components that make up the control plane of
Kubernetes. These components are responsible for all cluster decisions including both
scheduling and responding to cluster events.
Node - A single host, physical or virtual capable of running pods. A node is managed by the
master(s), and at a minimum runs both kubelet and kube-proxy to be considered part of the
cluster.
Namespace - A logical cluster or environment. Primary method of dividing a cluster or
scoping access.
Concepts - Core (cont.)
Label - Key-value pairs that are used to identify, describe and group together related sets of
objects. Labels have a strict syntax and available character set. *
Annotation - Key-value pairs that contain non-identifying information or metadata.
Annotations do not have the the syntax limitations labels and can contain structured or
unstructured data.
Selector - Selectors use labels to filter or select objects. Both equality-based (=, ==, !=) or
simple key-value matching selectors are supported.
* https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set
Labels:
app: nginx
tier: frontned
Annotations
description: โ€œnginx frontendโ€
Selector:
app: nginx
tier: frontend
Labels, and Annotations,
and Selectors
Set-based selectors
Valid Operators:
โ— In
โ— NotIn
โ— Exists
โ— DoesNotExist
Supported Objects with set-based selectors:
โ— Job
โ— Deployment
โ— ReplicaSet
โ— DaemonSet
โ— PersistentVolumeClaims
Concepts - Workloads
Pod - A pod is the smallest unit of work or management resource within Kubernetes. It is
comprised of one or more containers that share their storage, network, and context
(namespace, cgroups etc).
ReplicationController - Method of managing pod replicas and their lifecycle. Their
scheduling, scaling, and deletion.
ReplicaSet - Next Generation ReplicationController. Supports set-based selectors.
Deployment - A declarative method of managing stateless Pods and ReplicaSets. Provides
rollback functionality in addition to more granular update control mechanisms.
Deployment
ReplicaSet
Contains configuration
of how updates or
โ€˜deploymentsโ€™ should be
managed in addition to
the pod template used to
generate the ReplicaSet.
Generated ReplicaSet
from Deployment spec.
Concepts - Workloads (cont.)
StatefulSet - A controller tailored to managing Pods that must persist or maintain state. Pod
identity including hostname, network, and storage will be persisted.
DaemonSet - Ensures that all nodes matching certain criteria will run an instance of a
supplied Pod. Ideal for cluster wide services such as log forwarding, or health monitoring.
StatefulSet
โ— Attaches to โ€˜headeless serviceโ€™ (not shown) nginx.
โ— Pods given unique ordinal names using the pattern
<statefulset name>-<ordinal index>.
โ— Creates independent persistent volumes based on
the โ€˜volumeClaimTemplatesโ€™.
DaemonSet
โ— Bypasses default scheduler
โ— Schedules a single instance on every host while
adhering to tolerances and taints.
Concepts - Workloads (cont.)
Job - The job controller ensures one or more pods are executed and successfully terminates
until it satisfies the completion and/or parallelism condition.
CronJob - An extension of the Job Controller, it provides a method of executing jobs on a
cron-like schedule.
Jobs
โ— Number of pod executions can be controlled
via spec.completions
โ— Jobs can be parallelized using spec.parallelism
โ— Jobs and Pods are NOT automatically
cleaned up after a job has completed.
CronJob
โ— Adds cron schedule to job template
Concepts - Network
Service - Services provide a method of exposing and consuming L4 Pod network accessible
resources. They use label selectors to map groups of pods and ports to a cluster-unique virtual
IP.
Ingress - An ingress controller is the primary method of exposing a cluster service (usually
http) to the outside world. These are load balancers or routers that usually offer SSL
termination, name-based virtual hosting etc.
Service
โ— Acts as the unified method of accessing replicated pods.
โ— Four major Service Types:
โ—‹ CluterIP - Exposes service on a strictly cluster-internal IP (default)
โ—‹ NodePort - Service is exposed on each nodeโ€™s IP on a statically
defined port.
โ—‹ LoadBalancer - Works in combination with a cloud provider to
expose a service outside the cluster on a static external IP.
โ—‹ ExternalName - used to references endpoints OUTSIDE the cluster
by providing a static internally referenced DNS name.
Ingress Controller
โ— Deployed as a pod to one or more hosts
โ— Ingress controllers are an external
controller with multiple options.
โ—‹ Nginx
โ—‹ HAproxy
โ—‹ Contour
โ—‹ Traefik
โ— Specific features and controller specific
configuration is passed through
annotations.
Concepts - Storage
Volume - Storage that is tied to the Pod Lifecycle, consumable by one or more
containers within the pod.
PersistentVolume - A PersistentVolume (PV) represents a storage resource. PVs are
commonly linked to a backing storage resource, NFS, GCEPersistentDisk, RBD etc. and are
provisioned ahead of time. Their lifecycle is handled independently from a pod.
PersistentVolumeClaim - A PersistentVolumeClaim (PVC) is a request for storage that
satisfies a set of requirements instead of mapping to a storage resource directly. Commonly
used with dynamically provisioned storage.
StorageClass - Storage classes are an abstraction on top of an external storage resource.
These will include a provisioner, provisioner configuration parameters as well as a PV
reclaimPolicy.
Volumes
Persistent Volumes
โ— PVs are a cluster-wide resource
โ— Not directly consumable by a Pod
โ— PV Parameters:
โ—‹ Capacity
โ—‹ accessModes
โ–  ReadOnlyMany (ROX)
โ–  ReadWriteOnce (RWO)
โ–  ReadWriteMany (RWX)
โ—‹ persistentVolumeReclaimPolicy
โ–  Retain
โ–  Recycle
โ–  Delete
โ—‹ StorageClass
Persistent Volume Claims
โ— PVCs are scoped to namespaces
โ— Supports accessModes like PVs
โ— Uses resource request model similar to Pods
โ— Claims will consume storage from matching PVs
or StorageClasses based on storageClass and
selectors.
Storage Classes
โ— Uses an external system defined by the
provisioner to dynamically consume and
allocate storage.
โ— Storage Class Fields
โ—‹ Provisioner
โ—‹ Parameters
โ—‹ reclaimPolicy
Concepts - Configuration
ConfigMap - Externalized data stored within kubernetes that can be referenced as a
commandline argument, environment variable, or injected as a file into a volume mount. Ideal
for separating containerized application from configuration.
Secret - Functionally identical to ConfigMaps, but stored encoded as base64, and encrypted at
rest (if configured).
ConfigMaps and Secrets
โ— Can be used in Pod Config:
โ—‹ Injected as a file
โ—‹ Passed as an environment variable
โ—‹ Used as a container command (requires passing as env var)
Concepts - Auth and Identity (RBAC)
[Cluster]Role - Roles contain rules that act as a set of permissions that apply verbs like โ€œgetโ€,
โ€œlistโ€, โ€œwatchโ€ etc over resources that are scoped to apiGroups. Roles are scoped to namespaces,
and ClusterRoles are applied cluster-wide.
[Cluster]RoleBinding - Grant the permissions as defined in a [Cluster]Role to one or more
โ€œsubjectsโ€ which can be a user, group, or service account.
ServiceAccount- ServiceAccounts provide a consumable identity for pods or external
services that interact with the cluster directly and are scoped to namespaces.
[Cluster]Role
โ— Permissions translate to url
path. With โ€œโ€ defaulting to core
group.
โ— Resources act as items the role
should be granted access to.
โ— Verbs are the actions the role
can perform on the referenced
resources.
[Cluster]RoleBinding
โ— Can reference multiple subjects
โ— Subjects can be of kind:
โ—‹ User
โ—‹ Group
โ—‹ ServiceAccount
โ— roleRef targets a single role only.
Behind
The Scenes
Behind
The Scenes
Deployment From
Beginning to End
Kubectl
1) Kubectl performs client side
validation on manifest (linting).
2) Manifest is prepared and serialized
creating a JSON payload.
APIserver Request Loop
3) Kubectl authenticates to apiserver via x509, jwt,
http auth proxy, other plugins, or http-basic auth.
4) Authorization iterates over available AuthZ
sources: Node, ABAC, RBAC, or webhook.
5) Authorization iterates over available AuthZ
sources: Node, ABAC, RBAC, or webhook.
6) AdmissionControl checks resource quotas, other security related checks etc.
7) Request is stored in etcd.
8) Initializers given opportunity to mutate request before the object is published.
9) Request is published on apiserver.
Deployment Controller
10) Deployment Controller is notified of the new
Deployment via callback.
11) Deployment Controller evaluates cluster state and
reconciles the desired vs current state and forms a
request for the new ReplicaSet.
13) apiserver request loop evaluates Deployment
Controller request.
14) ReplicaSet is published.
ReplicaSet Controller
15) ReplicaSet Controller is notified of the new ReplicaSet
via callback.
16) ReplicaSet Controller evaluates cluster state and
reconciles the desired vs current state and forms a request
for the desired amount of pods.
17) apiserver request loop evaluates ReplicaSet
Controller request.
18) Pods published, and enter โ€˜Pendingโ€™ phase.
Scheduler
19) Scheduler monitors published pods with no
โ€˜NodeNameโ€™ assigned.
20) Applies scheduling rules and filters to find a
suitable node to host the Pod.
21) Scheduler creates a binding of Pod to Node and
POSTs to apiserver.
22) apiserver request loop evaluates POST request.
23) Pod status is updated with node binding and sets
status to โ€˜PodScheduledโ€™.
Kubelet - PodSync
24) The kubelet daemon on every node polls the apiserver filtering
for pods matching its own โ€˜NodeNameโ€™; checking its current state
with the desired state published through the apiserver.
25) Kubelet will then move through a series of internal processes to
prepare the pod environment. This includes pulling secrets,
provisioning storage, applying AppArmor profiles and other various
scaffolding. During this period, it will asynchronously be POSTโ€™ing
the โ€˜PodStatusโ€™ to the apiserver through the standard apiserver
request loop.
Pause and Plumbing
24) Kubelet then provisions a โ€˜pauseโ€™ container via the
CRI (Container Runtime Interface). The pause container
acts as the parent container for the Pod.
25) The network is plumbed to the Pod via the CNI
(Container Network Interface), creating a veth pair
attached to the pause container and to a container
bridge (cbr0).
26) IPAM handled by the CNI plugin assigns an IP to the
pause container.
Kublet - Create Containers
27) Kubelet pulls the container Images.
28) Kubelet first creates and starts any init containers.
29) Once the optional init containers complete, the
primary pod containers are started.
Pod Status
30) If there are any liveless/readiness probes, these are executed before the
PodStatus is updated.
31) If all complete successfully, PodStatus is set to ready and the container
has started successfully.
The Pod is Deployed!
Questions?

More Related Content

What's hot

What's hot (20)

Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
ย 
Kubernetes
KubernetesKubernetes
Kubernetes
ย 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
ย 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17
ย 
Getting Started with Kubernetes
Getting Started with Kubernetes Getting Started with Kubernetes
Getting Started with Kubernetes
ย 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
ย 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
ย 
Kubernetes - introduction
Kubernetes - introductionKubernetes - introduction
Kubernetes - introduction
ย 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
ย 
Kubernetes
KubernetesKubernetes
Kubernetes
ย 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
ย 
A brief study on Kubernetes and its components
A brief study on Kubernetes and its componentsA brief study on Kubernetes and its components
A brief study on Kubernetes and its components
ย 
Evolution of containers to kubernetes
Evolution of containers to kubernetesEvolution of containers to kubernetes
Evolution of containers to kubernetes
ย 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
ย 
Kubernetes PPT.pptx
Kubernetes PPT.pptxKubernetes PPT.pptx
Kubernetes PPT.pptx
ย 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
ย 
Introduction to helm
Introduction to helmIntroduction to helm
Introduction to helm
ย 
What Is Helm
 What Is Helm What Is Helm
What Is Helm
ย 
Kubernetes a comprehensive overview
Kubernetes   a comprehensive overviewKubernetes   a comprehensive overview
Kubernetes a comprehensive overview
ย 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
ย 

Similar to (Draft) Kubernetes - A Comprehensive Overview

kubernetesssssssssssssssssssssssssss.pdf
kubernetesssssssssssssssssssssssssss.pdfkubernetesssssssssssssssssssssssssss.pdf
kubernetesssssssssssssssssssssssssss.pdf
bchiriamina2
ย 

Similar to (Draft) Kubernetes - A Comprehensive Overview (20)

Kubernetes acomprehensiveoverview
Kubernetes acomprehensiveoverviewKubernetes acomprehensiveoverview
Kubernetes acomprehensiveoverview
ย 
08 - kubernetes.pptx
08 - kubernetes.pptx08 - kubernetes.pptx
08 - kubernetes.pptx
ย 
Kubernetes presentation
Kubernetes presentationKubernetes presentation
Kubernetes presentation
ย 
Kubernetes 101 for Beginners
Kubernetes 101 for BeginnersKubernetes 101 for Beginners
Kubernetes 101 for Beginners
ย 
Container Orchestration using kubernetes
Container Orchestration using kubernetesContainer Orchestration using kubernetes
Container Orchestration using kubernetes
ย 
Kubernetes From Scratch .pdf
Kubernetes From Scratch .pdfKubernetes From Scratch .pdf
Kubernetes From Scratch .pdf
ย 
Intro to Kubernetes
Intro to KubernetesIntro to Kubernetes
Intro to Kubernetes
ย 
Kubernetes-introduction to kubernetes for beginers.pptx
Kubernetes-introduction to kubernetes for beginers.pptxKubernetes-introduction to kubernetes for beginers.pptx
Kubernetes-introduction to kubernetes for beginers.pptx
ย 
Kubernetes Architecture with Components
 Kubernetes Architecture with Components Kubernetes Architecture with Components
Kubernetes Architecture with Components
ย 
Kubernetes #1 intro
Kubernetes #1   introKubernetes #1   intro
Kubernetes #1 intro
ย 
DevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesDevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to Kubernetes
ย 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetes
ย 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetes
ย 
Kubernetes
KubernetesKubernetes
Kubernetes
ย 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetes
ย 
Kubernetes fundamentals
Kubernetes fundamentalsKubernetes fundamentals
Kubernetes fundamentals
ย 
kubernetesssssssssssssssssssssssssss.pdf
kubernetesssssssssssssssssssssssssss.pdfkubernetesssssssssssssssssssssssssss.pdf
kubernetesssssssssssssssssssssssssss.pdf
ย 
KubernetesPPT.pptx
KubernetesPPT.pptxKubernetesPPT.pptx
KubernetesPPT.pptx
ย 
Kubernetes intro
Kubernetes introKubernetes intro
Kubernetes intro
ย 
01. Kubernetes-PPT.pptx
01. Kubernetes-PPT.pptx01. Kubernetes-PPT.pptx
01. Kubernetes-PPT.pptx
ย 

More from Bob Killen

More from Bob Killen (12)

Tackling New Challenges in a Virtual Focused Community
Tackling New Challenges in a Virtual Focused CommunityTackling New Challenges in a Virtual Focused Community
Tackling New Challenges in a Virtual Focused Community
ย 
KubeCon EU 2021 Keynote: Shaping Kubernetes Community Culture
KubeCon EU 2021 Keynote: Shaping Kubernetes Community CultureKubeCon EU 2021 Keynote: Shaping Kubernetes Community Culture
KubeCon EU 2021 Keynote: Shaping Kubernetes Community Culture
ย 
Intro to Kubernetes SIG Contributor Experience
Intro to Kubernetes SIG Contributor ExperienceIntro to Kubernetes SIG Contributor Experience
Intro to Kubernetes SIG Contributor Experience
ย 
Intro to the CNCF Research User Group
Intro to the CNCF Research User GroupIntro to the CNCF Research User Group
Intro to the CNCF Research User Group
ย 
A Peek Behind the Curtain: Managing the Kubernetes Contributor Community
A Peek Behind the Curtain: Managing the Kubernetes Contributor CommunityA Peek Behind the Curtain: Managing the Kubernetes Contributor Community
A Peek Behind the Curtain: Managing the Kubernetes Contributor Community
ย 
Kubernetes The New Research Platform
Kubernetes The New Research PlatformKubernetes The New Research Platform
Kubernetes The New Research Platform
ย 
Kubernetes: The Next Research Platform
Kubernetes: The Next Research PlatformKubernetes: The Next Research Platform
Kubernetes: The Next Research Platform
ย 
Getting started with kubernetes
Getting started with kubernetesGetting started with kubernetes
Getting started with kubernetes
ย 
Federated Kubernetes: As a Platform for Distributed Scientific Computing
Federated Kubernetes: As a Platform for Distributed Scientific ComputingFederated Kubernetes: As a Platform for Distributed Scientific Computing
Federated Kubernetes: As a Platform for Distributed Scientific Computing
ย 
The (mutable) config management showdown
The (mutable) config management showdownThe (mutable) config management showdown
The (mutable) config management showdown
ย 
Ansible, integration testing, and you.
Ansible, integration testing, and you.Ansible, integration testing, and you.
Ansible, integration testing, and you.
ย 
Pluggable Infrastructure with CI/CD and Docker
Pluggable Infrastructure with CI/CD and DockerPluggable Infrastructure with CI/CD and Docker
Pluggable Infrastructure with CI/CD and Docker
ย 

Recently uploaded

VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
ย 
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
SUHANI PANDEY
ย 
โžฅ๐Ÿ” 7737669865 ๐Ÿ”โ–ป mehsana Call-girls in Women Seeking Men ๐Ÿ”mehsana๐Ÿ” Escorts...
โžฅ๐Ÿ” 7737669865 ๐Ÿ”โ–ป mehsana Call-girls in Women Seeking Men  ๐Ÿ”mehsana๐Ÿ”   Escorts...โžฅ๐Ÿ” 7737669865 ๐Ÿ”โ–ป mehsana Call-girls in Women Seeking Men  ๐Ÿ”mehsana๐Ÿ”   Escorts...
โžฅ๐Ÿ” 7737669865 ๐Ÿ”โ–ป mehsana Call-girls in Women Seeking Men ๐Ÿ”mehsana๐Ÿ” Escorts...
nirzagarg
ย 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
SUHANI PANDEY
ย 
( Pune ) VIP Pimpri Chinchwad Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | G...( Pune ) VIP Pimpri Chinchwad Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | G...
nilamkumrai
ย 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
SUHANI PANDEY
ย 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
SUHANI PANDEY
ย 
๐Ÿ’š๐Ÿ˜‹ Bilaspur Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹
๐Ÿ’š๐Ÿ˜‹ Bilaspur Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹๐Ÿ’š๐Ÿ˜‹ Bilaspur Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹
๐Ÿ’š๐Ÿ˜‹ Bilaspur Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹
nirzagarg
ย 
( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...
nilamkumrai
ย 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
@Chandigarh #call #Girls 9053900678 @Call #Girls in @Punjab 9053900678
ย 
๐Ÿ“ฑDehradun Call Girls Service ๐Ÿ“ฑโ˜Ž๏ธ +91'905,3900,678 โ˜Ž๏ธ๐Ÿ“ฑ Call Girls In Dehradun ๐Ÿ“ฑ
๐Ÿ“ฑDehradun Call Girls Service ๐Ÿ“ฑโ˜Ž๏ธ +91'905,3900,678 โ˜Ž๏ธ๐Ÿ“ฑ Call Girls In Dehradun ๐Ÿ“ฑ๐Ÿ“ฑDehradun Call Girls Service ๐Ÿ“ฑโ˜Ž๏ธ +91'905,3900,678 โ˜Ž๏ธ๐Ÿ“ฑ Call Girls In Dehradun ๐Ÿ“ฑ
๐Ÿ“ฑDehradun Call Girls Service ๐Ÿ“ฑโ˜Ž๏ธ +91'905,3900,678 โ˜Ž๏ธ๐Ÿ“ฑ Call Girls In Dehradun ๐Ÿ“ฑ
@Chandigarh #call #Girls 9053900678 @Call #Girls in @Punjab 9053900678
ย 

Recently uploaded (20)

VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
ย 
Top Rated Pune Call Girls Daund โŸŸ 6297143586 โŸŸ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund โŸŸ 6297143586 โŸŸ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund โŸŸ 6297143586 โŸŸ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund โŸŸ 6297143586 โŸŸ Call Me For Genuine Sex Servi...
ย 
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
ย 
โžฅ๐Ÿ” 7737669865 ๐Ÿ”โ–ป mehsana Call-girls in Women Seeking Men ๐Ÿ”mehsana๐Ÿ” Escorts...
โžฅ๐Ÿ” 7737669865 ๐Ÿ”โ–ป mehsana Call-girls in Women Seeking Men  ๐Ÿ”mehsana๐Ÿ”   Escorts...โžฅ๐Ÿ” 7737669865 ๐Ÿ”โ–ป mehsana Call-girls in Women Seeking Men  ๐Ÿ”mehsana๐Ÿ”   Escorts...
โžฅ๐Ÿ” 7737669865 ๐Ÿ”โ–ป mehsana Call-girls in Women Seeking Men ๐Ÿ”mehsana๐Ÿ” Escorts...
ย 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
ย 
Busty DesiโšกCall Girls in Vasundhara Ghaziabad >เผ’8448380779 Escort Service
Busty DesiโšกCall Girls in Vasundhara Ghaziabad >เผ’8448380779 Escort ServiceBusty DesiโšกCall Girls in Vasundhara Ghaziabad >เผ’8448380779 Escort Service
Busty DesiโšกCall Girls in Vasundhara Ghaziabad >เผ’8448380779 Escort Service
ย 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
ย 
( Pune ) VIP Pimpri Chinchwad Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | G...( Pune ) VIP Pimpri Chinchwad Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | G...
ย 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
ย 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
ย 
๐Ÿ’š๐Ÿ˜‹ Bilaspur Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹
๐Ÿ’š๐Ÿ˜‹ Bilaspur Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹๐Ÿ’š๐Ÿ˜‹ Bilaspur Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹
๐Ÿ’š๐Ÿ˜‹ Bilaspur Escort Service Call Girls, 9352852248 โ‚น5000 To 25K With AC๐Ÿ’š๐Ÿ˜‹
ย 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
ย 
( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls ๐ŸŽ—๏ธ 9352988975 Sizzling | Escorts | Girls Are Re...
ย 
Real Escorts in Al Nahda +971524965298 Dubai Escorts Service
Real Escorts in Al Nahda +971524965298 Dubai Escorts ServiceReal Escorts in Al Nahda +971524965298 Dubai Escorts Service
Real Escorts in Al Nahda +971524965298 Dubai Escorts Service
ย 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
ย 
WhatsApp ๐Ÿ“ž 8448380779 โœ…Call Girls In Mamura Sector 66 ( Noida)
WhatsApp ๐Ÿ“ž 8448380779 โœ…Call Girls In Mamura Sector 66 ( Noida)WhatsApp ๐Ÿ“ž 8448380779 โœ…Call Girls In Mamura Sector 66 ( Noida)
WhatsApp ๐Ÿ“ž 8448380779 โœ…Call Girls In Mamura Sector 66 ( Noida)
ย 
Call Now โ˜Ž 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now โ˜Ž 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now โ˜Ž 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now โ˜Ž 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
ย 
๐“€คCall On 7877925207 ๐“€ค Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
๐“€คCall On 7877925207 ๐“€ค Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...๐“€คCall On 7877925207 ๐“€ค Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
๐“€คCall On 7877925207 ๐“€ค Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
ย 
๐Ÿ“ฑDehradun Call Girls Service ๐Ÿ“ฑโ˜Ž๏ธ +91'905,3900,678 โ˜Ž๏ธ๐Ÿ“ฑ Call Girls In Dehradun ๐Ÿ“ฑ
๐Ÿ“ฑDehradun Call Girls Service ๐Ÿ“ฑโ˜Ž๏ธ +91'905,3900,678 โ˜Ž๏ธ๐Ÿ“ฑ Call Girls In Dehradun ๐Ÿ“ฑ๐Ÿ“ฑDehradun Call Girls Service ๐Ÿ“ฑโ˜Ž๏ธ +91'905,3900,678 โ˜Ž๏ธ๐Ÿ“ฑ Call Girls In Dehradun ๐Ÿ“ฑ
๐Ÿ“ฑDehradun Call Girls Service ๐Ÿ“ฑโ˜Ž๏ธ +91'905,3900,678 โ˜Ž๏ธ๐Ÿ“ฑ Call Girls In Dehradun ๐Ÿ“ฑ
ย 
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
ย 

(Draft) Kubernetes - A Comprehensive Overview

  • 2. Agenda โ— Introduction โ—‹ Who am I? โ—‹ What is Kubernetes? โ—‹ What does Kubernetes do? โ— Architecture โ—‹ Master Components โ—‹ Node Components โ—‹ Additional Services โ—‹ Networking โ— Concepts โ—‹ Core โ—‹ Workloads โ—‹ Network โ—‹ Storage โ—‹ Configuration โ—‹ Auth and Identity โ— Behind the Scenes โ—‹ Deployment from Beginning to End
  • 4. Intro - Who am I? Bob Killen / rkillen@umich.edu Twitter / Github: @mrbobbytables Senior Research Cloud Administrator @ ARC-TS http://arc-ts.umich.edu
  • 5. Intro - What is Kubernetes? Kubernetes or K8s was a project spun out of Google as a open source next-gen container scheduler designed with the lessons learned from developing and managing Borg and Omega. Kubernetes was designed from the ground-up as a loosely coupled collection of components centered around deploying, maintaining, and scaling applications.
  • 6. Intro - What Does Kubernetes do? Kubernetes is the linux kernel of distributed systems. It abstracts away the underlying hardware of the nodes and provides a uniform interface for applications to be both deployed and consume the shared pool of resources.
  • 8. Architecture Overview Masters - Acts as the primary control plane for Kubernetes. Masters are responsible at a minimum for running the API Server, scheduler, and cluster controller. They commonly also manage storing cluster state, cloud-provider specific components and other cluster essential services. Nodes - Are the โ€˜workersโ€™ of a Kubernetes cluster. They run a minimal agent that manages the node itself, and are tasked with executing workloads as designated by the master.
  • 11. Master Components โ— Kube-apiserver โ— Etcd โ— Kube-controller-manager โ— Cloud-controller-manager โ— Kube-scheduler
  • 12. kube-apiserver The apiserver provides a forward facing REST interface into the kubernetes control plane and datastore. All clients, including nodes, users and other applications interact with kubernetes strictly through the API Server. It is the true core of Kubernetes acting as the gatekeeper to the cluster by handling authentication and authorization, request validation and mutation, admission control in addition to being the front-end to the backing datastore.
  • 13. etcd Etcd acts as the cluster datastore; providing a strong, consistent and highly available key-value store used for persisting cluster state.
  • 14. kube-controller-manager The controller-manager is the primary daemon that manages all core component control loops. It monitors the cluster state via the apiserver and steers the cluster towards the desired state. List of core controllers: https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-controller-manager/app/controllermanager.go#L332
  • 15. kube-scheduler Kube-scheduler is a verbose policy-rich engine that evaluates workload requirements and attempts to place it on a matching resource. These requirements can include such things as general hardware reqs, affinity, anti-affinity, and other custom resource requirements.
  • 16. cloud-controller-manager The cloud-controller-manager is a daemon that provides cloud-provider specific knowledge and integration capability into the core control loop of Kubernetes. The controllers include Node, Route, Service, and add an additional controller to handle PersistentVolumeLabels .
  • 18. Node Components โ— Kubelet โ— Kube-proxy โ— Container runtime engine
  • 19. kubelet Acts as the node agent responsible for managing pod lifecycle on its host. Kubelet understands YAML container manifests that it can read from several sources: โ— File path โ— HTTP Endpoint โ— Etcd watch acting on any changes โ— HTTP Server mode accepting container manifests over a simple API.
  • 20. kube-proxy Manages the network rules on each node and performs connection forwarding or load balancing for Kubernetes cluster services. Available Proxy Modes: โ— Userspace โ— iptables โ— ipvs (alpha in 1.8)
  • 21. Container Runtime With respect to Kubernetes, A container runtime is a CRI (Container Runtime Interface) compatible application that executes and manages containers. โ— Containerd (docker) โ— Cri-o โ— Rkt โ— Kata (formerly clear and hyper) โ— Virtlet (VM CRI compatible runtime)
  • 22. Additional Services Kube-dns - Provides cluster wide DNS Services. Services are resolvable to <service>.<namespace>.svc.cluster.local. Heapster - Metrics Collector for kubernetes cluster, used by some resources such as the Horizontal Pod Autoscaler. (required for kubedashboard metrics) Kube-dashboard - A general purpose web based UI for kubernetes.
  • 24. Networking - Fundamental Rules 1) All Pods can communicate with all other Pods without NAT 2) All nodes can communicate with all Pods (and vice-versa) without NAT. 3) The IP that a Pod sees itself as is the same IP that others see it as.
  • 25. Networking - Fundamentals Applied Containers within a pod exist within the same network namespace and share an IP; allowing for interpod communication over localhost. Pods are given a cluster unique IP for the duration of its lifecycle, but the pods themselves are fundamentally ephemeral. Services are given a persistent cluster unique IP that spans the Pods lifecycle. External Connectivity is generally handed by an integrated cloud provider or other external entity (load balancer)
  • 26. Networking - CNI Networking within Kubernetes is plumbed via the Container Network Interface (CNI), an interface between a container runtime and a network implementation plugin. Compatible CNI Network Plugins: โ— Calico โ— Cillium โ— Contiv โ— Contrail โ— Flannel โ— GCE โ— kube-router โ— Multus โ— OpenVSwitch โ— OVN โ— Romana โ— Weave
  • 28. Kubernetes Concepts - Core Cluster - A collection of hosts that aggregate their available resources including cpu, ram, disk, and their devices into a usable pool. Master - The master(s) represent a collection of components that make up the control plane of Kubernetes. These components are responsible for all cluster decisions including both scheduling and responding to cluster events. Node - A single host, physical or virtual capable of running pods. A node is managed by the master(s), and at a minimum runs both kubelet and kube-proxy to be considered part of the cluster. Namespace - A logical cluster or environment. Primary method of dividing a cluster or scoping access.
  • 29. Concepts - Core (cont.) Label - Key-value pairs that are used to identify, describe and group together related sets of objects. Labels have a strict syntax and available character set. * Annotation - Key-value pairs that contain non-identifying information or metadata. Annotations do not have the the syntax limitations labels and can contain structured or unstructured data. Selector - Selectors use labels to filter or select objects. Both equality-based (=, ==, !=) or simple key-value matching selectors are supported. * https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set
  • 30. Labels: app: nginx tier: frontned Annotations description: โ€œnginx frontendโ€ Selector: app: nginx tier: frontend Labels, and Annotations, and Selectors
  • 31. Set-based selectors Valid Operators: โ— In โ— NotIn โ— Exists โ— DoesNotExist Supported Objects with set-based selectors: โ— Job โ— Deployment โ— ReplicaSet โ— DaemonSet โ— PersistentVolumeClaims
  • 32. Concepts - Workloads Pod - A pod is the smallest unit of work or management resource within Kubernetes. It is comprised of one or more containers that share their storage, network, and context (namespace, cgroups etc). ReplicationController - Method of managing pod replicas and their lifecycle. Their scheduling, scaling, and deletion. ReplicaSet - Next Generation ReplicationController. Supports set-based selectors. Deployment - A declarative method of managing stateless Pods and ReplicaSets. Provides rollback functionality in addition to more granular update control mechanisms.
  • 33. Deployment ReplicaSet Contains configuration of how updates or โ€˜deploymentsโ€™ should be managed in addition to the pod template used to generate the ReplicaSet. Generated ReplicaSet from Deployment spec.
  • 34. Concepts - Workloads (cont.) StatefulSet - A controller tailored to managing Pods that must persist or maintain state. Pod identity including hostname, network, and storage will be persisted. DaemonSet - Ensures that all nodes matching certain criteria will run an instance of a supplied Pod. Ideal for cluster wide services such as log forwarding, or health monitoring.
  • 35. StatefulSet โ— Attaches to โ€˜headeless serviceโ€™ (not shown) nginx. โ— Pods given unique ordinal names using the pattern <statefulset name>-<ordinal index>. โ— Creates independent persistent volumes based on the โ€˜volumeClaimTemplatesโ€™.
  • 36. DaemonSet โ— Bypasses default scheduler โ— Schedules a single instance on every host while adhering to tolerances and taints.
  • 37. Concepts - Workloads (cont.) Job - The job controller ensures one or more pods are executed and successfully terminates until it satisfies the completion and/or parallelism condition. CronJob - An extension of the Job Controller, it provides a method of executing jobs on a cron-like schedule.
  • 38. Jobs โ— Number of pod executions can be controlled via spec.completions โ— Jobs can be parallelized using spec.parallelism โ— Jobs and Pods are NOT automatically cleaned up after a job has completed.
  • 39. CronJob โ— Adds cron schedule to job template
  • 40. Concepts - Network Service - Services provide a method of exposing and consuming L4 Pod network accessible resources. They use label selectors to map groups of pods and ports to a cluster-unique virtual IP. Ingress - An ingress controller is the primary method of exposing a cluster service (usually http) to the outside world. These are load balancers or routers that usually offer SSL termination, name-based virtual hosting etc.
  • 41. Service โ— Acts as the unified method of accessing replicated pods. โ— Four major Service Types: โ—‹ CluterIP - Exposes service on a strictly cluster-internal IP (default) โ—‹ NodePort - Service is exposed on each nodeโ€™s IP on a statically defined port. โ—‹ LoadBalancer - Works in combination with a cloud provider to expose a service outside the cluster on a static external IP. โ—‹ ExternalName - used to references endpoints OUTSIDE the cluster by providing a static internally referenced DNS name.
  • 42. Ingress Controller โ— Deployed as a pod to one or more hosts โ— Ingress controllers are an external controller with multiple options. โ—‹ Nginx โ—‹ HAproxy โ—‹ Contour โ—‹ Traefik โ— Specific features and controller specific configuration is passed through annotations.
  • 43. Concepts - Storage Volume - Storage that is tied to the Pod Lifecycle, consumable by one or more containers within the pod. PersistentVolume - A PersistentVolume (PV) represents a storage resource. PVs are commonly linked to a backing storage resource, NFS, GCEPersistentDisk, RBD etc. and are provisioned ahead of time. Their lifecycle is handled independently from a pod. PersistentVolumeClaim - A PersistentVolumeClaim (PVC) is a request for storage that satisfies a set of requirements instead of mapping to a storage resource directly. Commonly used with dynamically provisioned storage. StorageClass - Storage classes are an abstraction on top of an external storage resource. These will include a provisioner, provisioner configuration parameters as well as a PV reclaimPolicy.
  • 45. Persistent Volumes โ— PVs are a cluster-wide resource โ— Not directly consumable by a Pod โ— PV Parameters: โ—‹ Capacity โ—‹ accessModes โ–  ReadOnlyMany (ROX) โ–  ReadWriteOnce (RWO) โ–  ReadWriteMany (RWX) โ—‹ persistentVolumeReclaimPolicy โ–  Retain โ–  Recycle โ–  Delete โ—‹ StorageClass
  • 46. Persistent Volume Claims โ— PVCs are scoped to namespaces โ— Supports accessModes like PVs โ— Uses resource request model similar to Pods โ— Claims will consume storage from matching PVs or StorageClasses based on storageClass and selectors.
  • 47. Storage Classes โ— Uses an external system defined by the provisioner to dynamically consume and allocate storage. โ— Storage Class Fields โ—‹ Provisioner โ—‹ Parameters โ—‹ reclaimPolicy
  • 48. Concepts - Configuration ConfigMap - Externalized data stored within kubernetes that can be referenced as a commandline argument, environment variable, or injected as a file into a volume mount. Ideal for separating containerized application from configuration. Secret - Functionally identical to ConfigMaps, but stored encoded as base64, and encrypted at rest (if configured).
  • 49. ConfigMaps and Secrets โ— Can be used in Pod Config: โ—‹ Injected as a file โ—‹ Passed as an environment variable โ—‹ Used as a container command (requires passing as env var)
  • 50. Concepts - Auth and Identity (RBAC) [Cluster]Role - Roles contain rules that act as a set of permissions that apply verbs like โ€œgetโ€, โ€œlistโ€, โ€œwatchโ€ etc over resources that are scoped to apiGroups. Roles are scoped to namespaces, and ClusterRoles are applied cluster-wide. [Cluster]RoleBinding - Grant the permissions as defined in a [Cluster]Role to one or more โ€œsubjectsโ€ which can be a user, group, or service account. ServiceAccount- ServiceAccounts provide a consumable identity for pods or external services that interact with the cluster directly and are scoped to namespaces.
  • 51. [Cluster]Role โ— Permissions translate to url path. With โ€œโ€ defaulting to core group. โ— Resources act as items the role should be granted access to. โ— Verbs are the actions the role can perform on the referenced resources.
  • 52. [Cluster]RoleBinding โ— Can reference multiple subjects โ— Subjects can be of kind: โ—‹ User โ—‹ Group โ—‹ ServiceAccount โ— roleRef targets a single role only.
  • 56.
  • 57. Kubectl 1) Kubectl performs client side validation on manifest (linting). 2) Manifest is prepared and serialized creating a JSON payload.
  • 58. APIserver Request Loop 3) Kubectl authenticates to apiserver via x509, jwt, http auth proxy, other plugins, or http-basic auth. 4) Authorization iterates over available AuthZ sources: Node, ABAC, RBAC, or webhook. 5) Authorization iterates over available AuthZ sources: Node, ABAC, RBAC, or webhook. 6) AdmissionControl checks resource quotas, other security related checks etc. 7) Request is stored in etcd. 8) Initializers given opportunity to mutate request before the object is published. 9) Request is published on apiserver.
  • 59. Deployment Controller 10) Deployment Controller is notified of the new Deployment via callback. 11) Deployment Controller evaluates cluster state and reconciles the desired vs current state and forms a request for the new ReplicaSet. 13) apiserver request loop evaluates Deployment Controller request. 14) ReplicaSet is published.
  • 60. ReplicaSet Controller 15) ReplicaSet Controller is notified of the new ReplicaSet via callback. 16) ReplicaSet Controller evaluates cluster state and reconciles the desired vs current state and forms a request for the desired amount of pods. 17) apiserver request loop evaluates ReplicaSet Controller request. 18) Pods published, and enter โ€˜Pendingโ€™ phase.
  • 61.
  • 62. Scheduler 19) Scheduler monitors published pods with no โ€˜NodeNameโ€™ assigned. 20) Applies scheduling rules and filters to find a suitable node to host the Pod. 21) Scheduler creates a binding of Pod to Node and POSTs to apiserver. 22) apiserver request loop evaluates POST request. 23) Pod status is updated with node binding and sets status to โ€˜PodScheduledโ€™.
  • 63. Kubelet - PodSync 24) The kubelet daemon on every node polls the apiserver filtering for pods matching its own โ€˜NodeNameโ€™; checking its current state with the desired state published through the apiserver. 25) Kubelet will then move through a series of internal processes to prepare the pod environment. This includes pulling secrets, provisioning storage, applying AppArmor profiles and other various scaffolding. During this period, it will asynchronously be POSTโ€™ing the โ€˜PodStatusโ€™ to the apiserver through the standard apiserver request loop.
  • 64. Pause and Plumbing 24) Kubelet then provisions a โ€˜pauseโ€™ container via the CRI (Container Runtime Interface). The pause container acts as the parent container for the Pod. 25) The network is plumbed to the Pod via the CNI (Container Network Interface), creating a veth pair attached to the pause container and to a container bridge (cbr0). 26) IPAM handled by the CNI plugin assigns an IP to the pause container.
  • 65. Kublet - Create Containers 27) Kubelet pulls the container Images. 28) Kubelet first creates and starts any init containers. 29) Once the optional init containers complete, the primary pod containers are started.
  • 66. Pod Status 30) If there are any liveless/readiness probes, these are executed before the PodStatus is updated. 31) If all complete successfully, PodStatus is set to ready and the container has started successfully. The Pod is Deployed!