SlideShare a Scribd company logo
1 of 39
Introduction to Kubernetes 1.0
Compiled by Rajdeep
Twitter : @rajdeepdua
July 2015
Agenda
• Introduction
• Key Components
• Architecture
What is Kubernetes
• Service for Container Cluster Management
• Open Sourced by Google
• Supports GCE, CoreOS, Azure, vSphere,
• Used to manage Docker containers as a
default implementation
High Level Components
Key Concepts
• Concepts
– Master
– Nodes
– Pod
– Service and Labels
– Container
– Node
• Kubelet
• Kubernetes Proxy
• Kubernetes Control Panel
– API Server
– Controller Manager
– Persistent store : etcd
Master
• Master maintains the State of the Kubernetes
Server runtime
• State is maintained in the etcd backend
• It is the point of entry for all the client calls to
configure and manage Kubernetes
components like Nodes, Pods,
ReplicationControllers, Services
Master
• Master is also made up of following
components
– API Server
– Scheduler
– Registries (Internal Mechanism to Persist data)
• Minon Registry
• Pod Registry
• Service Registry
• Binding Registry
– Storage
Master
• restful.Container
– Container for webservices exposed
• Storage Objects
– PodStorage
– NodeStorage
– ReplicationControllerStorage
– ServicesStorage
– PersistVolumeStorage
Master – Key Components
Node
• Represents the
resource provided
for provisioning
pods
• Node runs a
Docker etcd and a
kubelet daemon
Node Registry
• Registry for keeping track of the nodes in the
Kubernetes cluster
• It is a Set implementation
• Actual implementation fetches list of hosts from the
underlying cloudprovider
• Referenced from the Master
– Actions performed on a Minon Registry
– Insert a Node
– Delete a Node
– Contains a Node
– List of Nodes
Pod
Pod
Pod is a collection of containers that can run on a host.
This resource is created by clients and scheduled onto
hosts.
• Pod represents a logical construct to bundle one or
more applications together
• It represents a Logical Host
• Volumes can be shared within the application in the
same pod
• In the docker world pod represents a bundle of
containers with shared volumes
• Pods are ephemeral in nature and never re-scheduled
on other nodes
Relation between a Node and a Pod
Pod
Structure
Pod Registry
• Wrapper on top of etcd persistent store
• Keeps track of Pods and their mapping to
minions
• Actions Performed on a Pod Registry
– List Pods – based on a Selector
– Watch Pods
– Create a Pod
– Update a Pod
– Delete a Pod
What is a Service?
• A Kubernetes Service is an abstraction which
defines a logical set of Pods and a policy by
which to access them - sometimes called a
micro-service.
• The set of Pods targeted by a Service is
(usually) determined by a Label Selector
Service
• A service defines a TCP or UDP port reservation.
• Provides a way for applications running in containers to
connect to each other without requiring that each one
be configured with the end-point IP addresses.
• Allows for abstracted configuration and for mobility
and load balancing of the providing containers.
• When a Kubernetes service, the service providers will
be labeled to receive traffic and the service consumers
will be given the access information in the environment
so that they can reach the providers.
Services
• Elements of a Service
– Name
– Port of the proxy
– Labels of a Service
– Selector
– Uses LoadBalancer
– Container Port
Example Service
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "my-service"
},
"spec": {
"selector": {
"app": "MyApp"
},
"ports": [
{
"protocol": "TCP",
"port": 80,
"targetPort": 9376
}
]
}
}
Service Details
ServiceRegistry
• Wrapper on top of etcd persistent store which
keeps track of Services
• List of Actions that can be performed on this
registry
– Create Service
– Get Service
– Delete a Service
– Update Service
– Update Endpoints for the service
– List Services
Sequence : List Services
Sequence List Services – Server Side
Replication Controller
• A replication controller ensures that a specified
number of pod "replicas" are running at any one
time
• Relevant for pods with RestartPolicy = Always
• Replication Controller uses Pod Templates to
create Pods
• Replication controller uses Pod Labels to monitor
and maintain the number of Pods to the desired
level
Replication Controller - Sample
Volumes
• Container’s disks a ephemeral in nature
• Everytime container restarts ephemeral disks are
restarted
• Docker volumes are just a mount point or host dir
• Kubernetes Volumes allow lifecycle of a volume
to be tied to that of the pod
• Different kind of volumes exist : emptyDir,
hostPath, iSCSi volume, AWS EBS, GCE Persistent
disc
Scheduler
• Responsible for scheduling POD on a minion
• Multiple implementations possible
type Scheduler interface {
Schedule(api.Pod, MinionLister)
(selectedMachine string, err error)
}
Scheduler Implementations
• Random Scheduler
• Round robin Scheduler
Kubelet
• Component which runs on
each minion and manages
the Pod and Container
Lifecycle
• There is 1:1 mapping
between a Host and a
Kubelet
• Key Elements of a Kubelet
– Docker Client
– Root Direcotry
– Pod Workers
– Etcd client
– Cadvisor client
Kubelet
• Key Elements of a Kubelet
– Hostname : Name of the host,
– Docker Client: based on github.com/fsouza/go-dockerclient,
used for Docker container create, start, stop and delete
– Pod Workers : Workers which act on each POD
– Etcd client : Interface for the persistent store
– Cadvisor client
– Health Checker
Functions performed by a Kubelet
• Run a Action on a Pod using a Worker
• Make binding between Volumes and a container.
• Make binding between Ports and a container.
• Run a single container in a given POD
• Kill a Container
• Create a Network Container for a POD
• Delete all containers in a POD
• Sync POD state with the data structure in a
Kubelet
Functions performed by a
Kubelet..cont
• Run a Command in a Container
• Health Information of the Container
• Root and POD info from Cadvisor
Run Container : Sequence Diagram
Run Container : Sequence Diagram
Run Container : Sequence Diagram
Run Container : Sequence Diagram
Run Container : Sequence Diagram
Summary
• Kubernetes allows you to deploy and manage
applications running on multiple hosts using
docker
• Not tied to a particular cloud implementation
but inspired by GCE and Google Infrastructure

More Related Content

What's hot

An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to KubernetesImesh Gunaratne
 
Getting Started with Kubernetes
Getting Started with Kubernetes Getting Started with Kubernetes
Getting Started with Kubernetes VMware Tanzu
 
DevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesDevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesRonny Trommer
 
Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Megan O'Keefe
 
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...Simplilearn
 
(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive OverviewBob Killen
 
Openshift Container Platform
Openshift Container PlatformOpenshift Container Platform
Openshift Container PlatformDLT Solutions
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker, Inc.
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to AnsibleKnoldus Inc.
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopBob Killen
 
Kubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewKubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewBob Killen
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes IntroductionPeng Xiao
 
Dockers and kubernetes
Dockers and kubernetesDockers and kubernetes
Dockers and kubernetesDr Ganesh Iyer
 
Introduction to Docker - 2017
Introduction to Docker - 2017Introduction to Docker - 2017
Introduction to Docker - 2017Docker, Inc.
 

What's hot (20)

An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
 
Docker & kubernetes
Docker & kubernetesDocker & kubernetes
Docker & kubernetes
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
 
Getting Started with Kubernetes
Getting Started with Kubernetes Getting Started with Kubernetes
Getting Started with Kubernetes
 
DevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesDevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to Kubernetes
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)
 
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
 
(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview
 
Openshift Container Platform
Openshift Container PlatformOpenshift Container Platform
Openshift Container Platform
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to Ansible
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
 
Architecture: Microservices
Architecture: MicroservicesArchitecture: Microservices
Architecture: Microservices
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Kubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewKubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive Overview
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Dockers and kubernetes
Dockers and kubernetesDockers and kubernetes
Dockers and kubernetes
 
Introduction to Docker - 2017
Introduction to Docker - 2017Introduction to Docker - 2017
Introduction to Docker - 2017
 

Similar to Introduction to Kubernetes

Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101Huy Vo
 
Kubernetes Internals
Kubernetes InternalsKubernetes Internals
Kubernetes InternalsShimi Bandiel
 
PlovDev 2016: Оркестрация на контейнери с Kubernetes - Мартин Владев
PlovDev 2016: Оркестрация на контейнери с Kubernetes - Мартин ВладевPlovDev 2016: Оркестрация на контейнери с Kubernetes - Мартин Владев
PlovDev 2016: Оркестрация на контейнери с Kubernetes - Мартин ВладевPlovDev Conference
 
Kubernetes fundamentals
Kubernetes fundamentalsKubernetes fundamentals
Kubernetes fundamentalsVictor Morales
 
Kubernetes intro public - kubernetes meetup 4-21-2015
Kubernetes intro   public - kubernetes meetup 4-21-2015Kubernetes intro   public - kubernetes meetup 4-21-2015
Kubernetes intro public - kubernetes meetup 4-21-2015Rohit Jnagal
 
Kubernetes intro public - kubernetes user group 4-21-2015
Kubernetes intro   public - kubernetes user group 4-21-2015Kubernetes intro   public - kubernetes user group 4-21-2015
Kubernetes intro public - kubernetes user group 4-21-2015reallavalamp
 
Developing Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containersDeveloping Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containersClaus Ibsen
 
DevNexus 2015: Kubernetes & Container Engine
DevNexus 2015: Kubernetes & Container EngineDevNexus 2015: Kubernetes & Container Engine
DevNexus 2015: Kubernetes & Container EngineKit Merker
 
Kubernetes Networking 101 kubecon EU 2022
Kubernetes Networking 101 kubecon EU 2022Kubernetes Networking 101 kubecon EU 2022
Kubernetes Networking 101 kubecon EU 2022ssuser1490e8
 
Kubernetes overview 101
Kubernetes overview 101Kubernetes overview 101
Kubernetes overview 101Boskey Savla
 
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMwareVMUG IT
 
Kubernetes #1 intro
Kubernetes #1   introKubernetes #1   intro
Kubernetes #1 introTerry Cho
 
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...Frank Lyaruu
 
Kubernetes-Presentation-Syed-Murtaza-Hassan
Kubernetes-Presentation-Syed-Murtaza-HassanKubernetes-Presentation-Syed-Murtaza-Hassan
Kubernetes-Presentation-Syed-Murtaza-HassanSyed Murtaza Hassan
 
NATS: A Cloud Native Messaging System
NATS: A Cloud Native Messaging SystemNATS: A Cloud Native Messaging System
NATS: A Cloud Native Messaging SystemShiju Varghese
 
99cloud Docker Training module 2
99cloud Docker Training module 299cloud Docker Training module 2
99cloud Docker Training module 2Liang Bo
 
Kubernetes Fundamentals on Azure 2017
Kubernetes Fundamentals on Azure 2017Kubernetes Fundamentals on Azure 2017
Kubernetes Fundamentals on Azure 2017Vadim Zendejas
 
Container Conf 2017: Rancher Kubernetes
Container Conf 2017: Rancher KubernetesContainer Conf 2017: Rancher Kubernetes
Container Conf 2017: Rancher KubernetesVishal Biyani
 
Nodeless and serverless kubernetes
Nodeless and serverless kubernetesNodeless and serverless kubernetes
Nodeless and serverless kubernetesNills Franssens
 

Similar to Introduction to Kubernetes (20)

Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Kubernetes Internals
Kubernetes InternalsKubernetes Internals
Kubernetes Internals
 
PlovDev 2016: Оркестрация на контейнери с Kubernetes - Мартин Владев
PlovDev 2016: Оркестрация на контейнери с Kubernetes - Мартин ВладевPlovDev 2016: Оркестрация на контейнери с Kubernetes - Мартин Владев
PlovDev 2016: Оркестрация на контейнери с Kubernetes - Мартин Владев
 
Kubernetes fundamentals
Kubernetes fundamentalsKubernetes fundamentals
Kubernetes fundamentals
 
Kubernetes intro public - kubernetes meetup 4-21-2015
Kubernetes intro   public - kubernetes meetup 4-21-2015Kubernetes intro   public - kubernetes meetup 4-21-2015
Kubernetes intro public - kubernetes meetup 4-21-2015
 
Kubernetes intro public - kubernetes user group 4-21-2015
Kubernetes intro   public - kubernetes user group 4-21-2015Kubernetes intro   public - kubernetes user group 4-21-2015
Kubernetes intro public - kubernetes user group 4-21-2015
 
Developing Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containersDeveloping Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containers
 
DevNexus 2015: Kubernetes & Container Engine
DevNexus 2015: Kubernetes & Container EngineDevNexus 2015: Kubernetes & Container Engine
DevNexus 2015: Kubernetes & Container Engine
 
Kubernetes Networking 101 kubecon EU 2022
Kubernetes Networking 101 kubecon EU 2022Kubernetes Networking 101 kubecon EU 2022
Kubernetes Networking 101 kubecon EU 2022
 
Kubernetes overview 101
Kubernetes overview 101Kubernetes overview 101
Kubernetes overview 101
 
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
 
Kubernetes #1 intro
Kubernetes #1   introKubernetes #1   intro
Kubernetes #1 intro
 
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
 
Kubernetes-Presentation-Syed-Murtaza-Hassan
Kubernetes-Presentation-Syed-Murtaza-HassanKubernetes-Presentation-Syed-Murtaza-Hassan
Kubernetes-Presentation-Syed-Murtaza-Hassan
 
NATS: A Cloud Native Messaging System
NATS: A Cloud Native Messaging SystemNATS: A Cloud Native Messaging System
NATS: A Cloud Native Messaging System
 
99cloud Docker Training module 2
99cloud Docker Training module 299cloud Docker Training module 2
99cloud Docker Training module 2
 
Kubernetes-Meetup
Kubernetes-MeetupKubernetes-Meetup
Kubernetes-Meetup
 
Kubernetes Fundamentals on Azure 2017
Kubernetes Fundamentals on Azure 2017Kubernetes Fundamentals on Azure 2017
Kubernetes Fundamentals on Azure 2017
 
Container Conf 2017: Rancher Kubernetes
Container Conf 2017: Rancher KubernetesContainer Conf 2017: Rancher Kubernetes
Container Conf 2017: Rancher Kubernetes
 
Nodeless and serverless kubernetes
Nodeless and serverless kubernetesNodeless and serverless kubernetes
Nodeless and serverless kubernetes
 

More from rajdeep

Aura Framework Overview
Aura Framework OverviewAura Framework Overview
Aura Framework Overviewrajdeep
 
Docker 1.5
Docker 1.5Docker 1.5
Docker 1.5rajdeep
 
Docker Swarm Introduction
Docker Swarm IntroductionDocker Swarm Introduction
Docker Swarm Introductionrajdeep
 
Docker Architecture (v1.3)
Docker Architecture (v1.3)Docker Architecture (v1.3)
Docker Architecture (v1.3)rajdeep
 
Openstack Overview
Openstack OverviewOpenstack Overview
Openstack Overviewrajdeep
 
virtualization-vs-containerization-paas
virtualization-vs-containerization-paasvirtualization-vs-containerization-paas
virtualization-vs-containerization-paasrajdeep
 
VMware Hybrid Cloud Service - Overview
VMware Hybrid Cloud Service - OverviewVMware Hybrid Cloud Service - Overview
VMware Hybrid Cloud Service - Overviewrajdeep
 
Cloudfoundry Overview
Cloudfoundry OverviewCloudfoundry Overview
Cloudfoundry Overviewrajdeep
 
OpenvSwitch Deep Dive
OpenvSwitch Deep DiveOpenvSwitch Deep Dive
OpenvSwitch Deep Diverajdeep
 
Openstack meetup-pune-aug22-overview
Openstack meetup-pune-aug22-overviewOpenstack meetup-pune-aug22-overview
Openstack meetup-pune-aug22-overviewrajdeep
 
Deploy Cloud Foundry using bosh_bootstrap
Deploy Cloud Foundry using bosh_bootstrapDeploy Cloud Foundry using bosh_bootstrap
Deploy Cloud Foundry using bosh_bootstraprajdeep
 
Managing Activity Backstack
Managing Activity BackstackManaging Activity Backstack
Managing Activity Backstackrajdeep
 
Cloud Foundry Architecture and Overview
Cloud Foundry Architecture and OverviewCloud Foundry Architecture and Overview
Cloud Foundry Architecture and Overviewrajdeep
 
Cloud Foundry Open Tour India 2012 , Keynote
Cloud Foundry Open Tour India 2012 , KeynoteCloud Foundry Open Tour India 2012 , Keynote
Cloud Foundry Open Tour India 2012 , Keynoterajdeep
 
Play Support in Cloud Foundry
Play Support in Cloud FoundryPlay Support in Cloud Foundry
Play Support in Cloud Foundryrajdeep
 
Google cloud platform
Google cloud platformGoogle cloud platform
Google cloud platformrajdeep
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Enginerajdeep
 

More from rajdeep (17)

Aura Framework Overview
Aura Framework OverviewAura Framework Overview
Aura Framework Overview
 
Docker 1.5
Docker 1.5Docker 1.5
Docker 1.5
 
Docker Swarm Introduction
Docker Swarm IntroductionDocker Swarm Introduction
Docker Swarm Introduction
 
Docker Architecture (v1.3)
Docker Architecture (v1.3)Docker Architecture (v1.3)
Docker Architecture (v1.3)
 
Openstack Overview
Openstack OverviewOpenstack Overview
Openstack Overview
 
virtualization-vs-containerization-paas
virtualization-vs-containerization-paasvirtualization-vs-containerization-paas
virtualization-vs-containerization-paas
 
VMware Hybrid Cloud Service - Overview
VMware Hybrid Cloud Service - OverviewVMware Hybrid Cloud Service - Overview
VMware Hybrid Cloud Service - Overview
 
Cloudfoundry Overview
Cloudfoundry OverviewCloudfoundry Overview
Cloudfoundry Overview
 
OpenvSwitch Deep Dive
OpenvSwitch Deep DiveOpenvSwitch Deep Dive
OpenvSwitch Deep Dive
 
Openstack meetup-pune-aug22-overview
Openstack meetup-pune-aug22-overviewOpenstack meetup-pune-aug22-overview
Openstack meetup-pune-aug22-overview
 
Deploy Cloud Foundry using bosh_bootstrap
Deploy Cloud Foundry using bosh_bootstrapDeploy Cloud Foundry using bosh_bootstrap
Deploy Cloud Foundry using bosh_bootstrap
 
Managing Activity Backstack
Managing Activity BackstackManaging Activity Backstack
Managing Activity Backstack
 
Cloud Foundry Architecture and Overview
Cloud Foundry Architecture and OverviewCloud Foundry Architecture and Overview
Cloud Foundry Architecture and Overview
 
Cloud Foundry Open Tour India 2012 , Keynote
Cloud Foundry Open Tour India 2012 , KeynoteCloud Foundry Open Tour India 2012 , Keynote
Cloud Foundry Open Tour India 2012 , Keynote
 
Play Support in Cloud Foundry
Play Support in Cloud FoundryPlay Support in Cloud Foundry
Play Support in Cloud Foundry
 
Google cloud platform
Google cloud platformGoogle cloud platform
Google cloud platform
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
 

Recently uploaded

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Recently uploaded (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Introduction to Kubernetes

  • 1. Introduction to Kubernetes 1.0 Compiled by Rajdeep Twitter : @rajdeepdua July 2015
  • 2. Agenda • Introduction • Key Components • Architecture
  • 3. What is Kubernetes • Service for Container Cluster Management • Open Sourced by Google • Supports GCE, CoreOS, Azure, vSphere, • Used to manage Docker containers as a default implementation
  • 5. Key Concepts • Concepts – Master – Nodes – Pod – Service and Labels – Container – Node • Kubelet • Kubernetes Proxy • Kubernetes Control Panel – API Server – Controller Manager – Persistent store : etcd
  • 6. Master • Master maintains the State of the Kubernetes Server runtime • State is maintained in the etcd backend • It is the point of entry for all the client calls to configure and manage Kubernetes components like Nodes, Pods, ReplicationControllers, Services
  • 7. Master • Master is also made up of following components – API Server – Scheduler – Registries (Internal Mechanism to Persist data) • Minon Registry • Pod Registry • Service Registry • Binding Registry – Storage
  • 8. Master • restful.Container – Container for webservices exposed • Storage Objects – PodStorage – NodeStorage – ReplicationControllerStorage – ServicesStorage – PersistVolumeStorage
  • 9. Master – Key Components
  • 10. Node • Represents the resource provided for provisioning pods • Node runs a Docker etcd and a kubelet daemon
  • 11. Node Registry • Registry for keeping track of the nodes in the Kubernetes cluster • It is a Set implementation • Actual implementation fetches list of hosts from the underlying cloudprovider • Referenced from the Master – Actions performed on a Minon Registry – Insert a Node – Delete a Node – Contains a Node – List of Nodes
  • 12. Pod
  • 13. Pod Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts. • Pod represents a logical construct to bundle one or more applications together • It represents a Logical Host • Volumes can be shared within the application in the same pod • In the docker world pod represents a bundle of containers with shared volumes • Pods are ephemeral in nature and never re-scheduled on other nodes
  • 14. Relation between a Node and a Pod
  • 16. Pod Registry • Wrapper on top of etcd persistent store • Keeps track of Pods and their mapping to minions • Actions Performed on a Pod Registry – List Pods – based on a Selector – Watch Pods – Create a Pod – Update a Pod – Delete a Pod
  • 17. What is a Service? • A Kubernetes Service is an abstraction which defines a logical set of Pods and a policy by which to access them - sometimes called a micro-service. • The set of Pods targeted by a Service is (usually) determined by a Label Selector
  • 18. Service • A service defines a TCP or UDP port reservation. • Provides a way for applications running in containers to connect to each other without requiring that each one be configured with the end-point IP addresses. • Allows for abstracted configuration and for mobility and load balancing of the providing containers. • When a Kubernetes service, the service providers will be labeled to receive traffic and the service consumers will be given the access information in the environment so that they can reach the providers.
  • 19. Services • Elements of a Service – Name – Port of the proxy – Labels of a Service – Selector – Uses LoadBalancer – Container Port
  • 20. Example Service { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "my-service" }, "spec": { "selector": { "app": "MyApp" }, "ports": [ { "protocol": "TCP", "port": 80, "targetPort": 9376 } ] } }
  • 22. ServiceRegistry • Wrapper on top of etcd persistent store which keeps track of Services • List of Actions that can be performed on this registry – Create Service – Get Service – Delete a Service – Update Service – Update Endpoints for the service – List Services
  • 23. Sequence : List Services
  • 24. Sequence List Services – Server Side
  • 25. Replication Controller • A replication controller ensures that a specified number of pod "replicas" are running at any one time • Relevant for pods with RestartPolicy = Always • Replication Controller uses Pod Templates to create Pods • Replication controller uses Pod Labels to monitor and maintain the number of Pods to the desired level
  • 27. Volumes • Container’s disks a ephemeral in nature • Everytime container restarts ephemeral disks are restarted • Docker volumes are just a mount point or host dir • Kubernetes Volumes allow lifecycle of a volume to be tied to that of the pod • Different kind of volumes exist : emptyDir, hostPath, iSCSi volume, AWS EBS, GCE Persistent disc
  • 28. Scheduler • Responsible for scheduling POD on a minion • Multiple implementations possible type Scheduler interface { Schedule(api.Pod, MinionLister) (selectedMachine string, err error) }
  • 29. Scheduler Implementations • Random Scheduler • Round robin Scheduler
  • 30. Kubelet • Component which runs on each minion and manages the Pod and Container Lifecycle • There is 1:1 mapping between a Host and a Kubelet • Key Elements of a Kubelet – Docker Client – Root Direcotry – Pod Workers – Etcd client – Cadvisor client
  • 31. Kubelet • Key Elements of a Kubelet – Hostname : Name of the host, – Docker Client: based on github.com/fsouza/go-dockerclient, used for Docker container create, start, stop and delete – Pod Workers : Workers which act on each POD – Etcd client : Interface for the persistent store – Cadvisor client – Health Checker
  • 32. Functions performed by a Kubelet • Run a Action on a Pod using a Worker • Make binding between Volumes and a container. • Make binding between Ports and a container. • Run a single container in a given POD • Kill a Container • Create a Network Container for a POD • Delete all containers in a POD • Sync POD state with the data structure in a Kubelet
  • 33. Functions performed by a Kubelet..cont • Run a Command in a Container • Health Information of the Container • Root and POD info from Cadvisor
  • 34. Run Container : Sequence Diagram
  • 35. Run Container : Sequence Diagram
  • 36. Run Container : Sequence Diagram
  • 37. Run Container : Sequence Diagram
  • 38. Run Container : Sequence Diagram
  • 39. Summary • Kubernetes allows you to deploy and manage applications running on multiple hosts using docker • Not tied to a particular cloud implementation but inspired by GCE and Google Infrastructure

Editor's Notes

  1. PodCIDR represents the pod IP range assigned to the node External ID of the node assigned by some machine database (e.g. a cloud provider)
  2. type Registry interface { List() (currentMinions []string, err error) Insert(minion string) error Delete(minion string) error Contains(minion string) (bool, error) }
  3. const ( // PodPending means the pod has been accepted by the system, but one or more of the containers // has not been started. This includes time before being bound to a node, as well as time spent // pulling images onto the host. // PodRunning means the pod has been bound to a node and all of the containers have been started. // At least one container is still running or is in the process of being restarted. // PodSucceeded means that all containers in the pod have voluntarily terminated // with a container exit code of 0, and the system is not going to restart any of these containers. // PodFailed means that all containers in the pod have terminated, and at least one container has // terminated in a failure (exited with a non-zero exit code or was stopped by the system). // PodUnknown means that for some reason the state of the pod could not be obtained, typically due // to an error in communicating with the host of the pod. ) HostNetwork : Uses the host's network namespace. If this option is set, the ports that will be used must be specified. Optional: Default to false.
  4. ListPods(selector labels.Selector) ([]api.Pod, error) // Watch for new/changed/deleted pods WatchPods(resourceVersion uint64) (watch.Interface, error) // Get a specific pod GetPod(podID string) (*api.Pod, error) // Create a pod based on a specification, schedule it onto a specific machine. CreatePod(machine string, pod api.Pod) error // Update an existing pod UpdatePod(pod api.Pod) error // Delete an existing pod DeletePod(podID string) error
  5. // Service is a named abstraction of software service (for example, mysql) consisting of local port // (for example 3306) that the proxy listens on, and the selector that determines which pods // will answer requests sent through the proxy. type Service struct { JSONBase `json:",inline" yaml:",inline"` Port int `json:"port,omitempty" yaml:"port,omitempty"` // This service's labels. Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` // This service will route traffic to pods having labels matching this selector. Selector map[string]string `json:"selector,omitempty" yaml:"selector,omitempty"` CreateExternalLoadBalancer bool `json:"createExternalLoadBalancer,omitempty" yaml:"createExternalLoadBalancer,omitempty"` // ContainerPort is the name of the port on the container to direct traffic to. // Optional, if unspecified use the first port on the container. ContainerPort util.IntOrString `json:"containerPort,omitempty" yaml:"containerPort,omitempty"` }
  6. ListServices() (api.ServiceList, error) CreateService(svc api.Service) error GetService(name string) (*api.Service, error) DeleteService(name string) error UpdateService(svc api.Service) error UpdateEndpoints(e api.Endpoints) error
  7. type Kubelet struct { hostname string dockerClient DockerInterface rootDirectory string podWorkers podWorkers resyncInterval time.Duration // Optional, no events will be sent without it etcdClient tools.EtcdClient // Optional, no statistics will be available if omitted cadvisorClient CadvisorInterface // Optional, defaults to simple implementaiton healthChecker health.HealthChecker // Optional, defaults to simple Docker implementation dockerPuller DockerPuller // Optional, defaults to /logs/ from /var/log logServer http.Handler // Optional, defaults to simple Docker implementation runner ContainerCommandRunner }
  8. type Kubelet struct { hostname string dockerClient DockerInterface rootDirectory string podWorkers podWorkers resyncInterval time.Duration // Optional, no events will be sent without it etcdClient tools.EtcdClient // Optional, no statistics will be available if omitted cadvisorClient CadvisorInterface // Optional, defaults to simple implementaiton healthChecker health.HealthChecker // Optional, defaults to simple Docker implementation dockerPuller DockerPuller // Optional, defaults to /logs/ from /var/log logServer http.Handler // Optional, defaults to simple Docker implementation runner ContainerCommandRunner }