SlideShare a Scribd company logo
Introduction to Kubernetes
@timothysc
Overview
● Motivation / Mission / Vision
● Architectural Overview
● Operations
● Demo
Assumption: You already
know about Docker &|
have attended the other
meetups or talks. I’m
going to skip Docker.
Kubernetes Motivation
What is kubernetes?
● Greek for “Helmsman”
● Kubernetes is an open source system for managing containerized
applications across multiple hosts, providing basic mechanisms for
deployment, maintenance, and scaling of applications. It’s APIs are
intended to serve as the foundation for an open ecosystem of tools,
automations systems, and higher-level API layers.
● Kubernetes establishes robust declarative primitives for maintaining the
desired state requested by the user. These primitives are the main
value added by Kubernetes.
What’s the motivation for kubernetes?
Develop a set of common declarative primitives
that operators can leverage to build a reliable
micro-service architecture in a composable
manner.
Tools around this core construct “could” provide
additional features, including cluster
management (elasticity ...), federation, etc.
Why?
A part of this is market positioning and commercialization, while the
other part is experience and opinions.
Google has years of experience managing containers at scale
under Borg & Omega. By exposing a subset of these features
targeting specific use cases they present themselves(GCE) as the
defacto cloud provider for running your container workloads to meet
those use cases.
It’s a legit positioning move for the shift from vm’s -> containers.
Why micro-services?
● Breaking down the SILOs
○ State of the Art of Micro-services @adrianco: http://youtu.
be/nMTaS07i3jk
● By cleanly defining the api’s between services and load balancing across
those services, it enables clever deployments
○ 1:64 gets some special UI to test
○ Rolling upgrades
○ Never go down
○ Autoscale only the service that needs it.
● Portability, flexibility, speed of development ....
○ Continuous Deployment [github push -> go build -> Run] O(minutes)
Use Case Example
You are going to create a new super awesome webpage
kittenpicsABC123.com, and you want to make $$$ off of it
with the following requirements:
● Use Containers
● You want to continuously deploy cool new changes
○ advertising changes
● Resilient against multiple failures
● Replicated-layers that are load-balanced
● SOA++
Front End
v1 v1 v1 v1 c1
internet
Mid-Tier
v1 v1 v1 v1 c1
Back-end
v1 v1 v1 v1 c1
kittenpicsABC123.com
Why declarative vs. imperative?
● Common use case patterns immerge, so make them
simple
● Doesn’t require a high level of understanding to get
started, which reduces the barrier to entry.
● Imperative could be used in many non-standard ways
that was never intended, especially if there is state.
● ...
State Space
IaaS
Manage your own
machines
PaaS
Swipe my credit
card and make
my .jar just work
and scale
I consider k8’s as a ⅔ lob towards PaaS.
Kubernetes Architecture
Principles & Concepts
● Design Principles
● Core Concepts
○ Pods & Containers
○ Services
○ Labels
○ Controller(s) - replication controller
○ Selector
● Other Concepts [skip for today]
○ events
Design Principles - thockin’s crib
Declarative
Feedback Control loops : Controller = loop
Simple
Modular
Legacy compatible
Network-centric : IP per pod
Treat machines as Cattle not Pets
Open Source
Docker Madison, Introduction to Kubernetes
What is a POD?
A pod (as in a pod of whales or pea pod) correspond to a
collocated group of “containers” with shared volumes. A
pod models an application-specific "logical host" in a
containerized environment. It may contain one or more
containers which are relatively tightly coupled -- in a pre-
container world, they would have executed on the same
physical or virtual host.
Why Pods?
● Pods are tightly coupled.
● Pods facilitate data sharing, and are a group of
containers that are scheduled onto the same host
○ shared mount
○ shared network namespace/IP and port space
○ higher order abstraction to the low level interface
○ Composable micro-services
● Pods abstract the gritty details of container
● Unit of scheduling
What are Services?
Yet
Another
Reuse of
Nomenclature
In-order-to
Confuse
Everyone
pirate speak - (YAR-NICE)
What are Services?
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 goal of services is to provide a bridge for non-Kubernetes-native
applications to access backends without the need to write code that is
specific to Kubernetes. A service offers clients an IP and port pair which,
when accessed, redirects to the appropriate backends. The set of pods
targetted is determined by a label selector.
It’s a NAT’d load-balanced proxy, whose IPADDR is injected into the
containers that are using that service via an environment variable.
What are Services?
What are Labels?
Labels are key/value pairs that are attached to objects, such as
pods. Labels can be used to organize and to select subsets of
objects. They are created by users at the same time as an object.
Each object can have a set of key/value labels set on it, with at
most one label with a particular key.
"labels": {
"key1" : "value1",
"key2" : "value2"
}
What are Replication Controllers?
A replication controller ensures that a specified number of
pod "replicas" are running at any one time. If there are too
many, it will kill some. If there are too few, it will start more.
As opposed to just creating singleton pods or even creating
pods in bulk, a replication controller replaces pods that are
deleted or terminated for any reason, such as in the case of
node failure.
Replication Controller Use Cases
● Rescheduling
○ Fault tolerant
● Scaling
○ up or down cluster management tools
● Rolling Updates
○ application readiness = ?
● Multiple Release Tracks
○ stable, prod, canary
What is a Selector?
Label selectors permit very simple filtering by label keys and
values. Currently, label selectors only support these forms:
key1
key1 = value11
key1 != value11
key1 in (value11, value12, ...)
key1 not in (value11, value12, ...)
Kubernetes Operations
API Server
Scheduling
KCM (loops)
Kubelet Proxy
Deployment
Master
Minions
cadvisor
Docker Madison, Introduction to Kubernetes
Runtime behavior
● apiserver
○ main entry point for *operations
● scheduler
○ matches pods to nodes.
● kube controller manager
○ node controller
■ checks machine + pod health
○ replication controller
■ verifies total count is correct.
○ … (quota)
● kubelet
○ runs pods
● proxy
○ load balancing
Demo

More Related Content

PDF
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
PPTX
Introduction to Kubernetes
PDF
Quick introduction to Kubernetes
PDF
Kubernetes architecture
PDF
DevJam 2019 - Introduction to Kubernetes
PDF
Scaling Docker with Kubernetes
PDF
Kubernetes - introduction
PPTX
Kubernetes 101 Workshop
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
Introduction to Kubernetes
Quick introduction to Kubernetes
Kubernetes architecture
DevJam 2019 - Introduction to Kubernetes
Scaling Docker with Kubernetes
Kubernetes - introduction
Kubernetes 101 Workshop

What's hot (20)

PDF
Hands-On Introduction to Kubernetes at LISA17
PDF
Scaling Microservices with Kubernetes
PDF
Containers, Clusters and Kubernetes - Brendan Burns - Defrag 2014
PDF
Kubernetes intro public - kubernetes meetup 4-21-2015
PPTX
Docker and kubernetes_introduction
PDF
kubernetes for beginners
PPTX
Orchestrating Docker Containers with Google Kubernetes on OpenStack
PPTX
Introduction to kubernetes
PPT
Building Clustered Applications with Kubernetes and Docker
PDF
Introduction to Kubernetes
PDF
Kubernetes Architecture and Introduction
PDF
Kubernetes in 15 minutes
PPTX
Planes, Raft, and Pods: A Tour of Distributed Systems Within Kubernetes
PDF
Docker and Kubernetes 101 workshop
PPT
An Introduction to Container Organization with Docker Swarm, Kubernetes, Meso...
PDF
Intro to Kubernetes
PPTX
Kubernetes Introduction
PDF
Introduction to kubernetes
PPTX
Kubernetes Workshop
PDF
Introduction to Kubernetes Workshop
Hands-On Introduction to Kubernetes at LISA17
Scaling Microservices with Kubernetes
Containers, Clusters and Kubernetes - Brendan Burns - Defrag 2014
Kubernetes intro public - kubernetes meetup 4-21-2015
Docker and kubernetes_introduction
kubernetes for beginners
Orchestrating Docker Containers with Google Kubernetes on OpenStack
Introduction to kubernetes
Building Clustered Applications with Kubernetes and Docker
Introduction to Kubernetes
Kubernetes Architecture and Introduction
Kubernetes in 15 minutes
Planes, Raft, and Pods: A Tour of Distributed Systems Within Kubernetes
Docker and Kubernetes 101 workshop
An Introduction to Container Organization with Docker Swarm, Kubernetes, Meso...
Intro to Kubernetes
Kubernetes Introduction
Introduction to kubernetes
Kubernetes Workshop
Introduction to Kubernetes Workshop
Ad

Viewers also liked (16)

PDF
Kubernetes automation in production
PDF
An Introduction to Kubernetes
PDF
Introduction to kubernetes
PDF
ContainerDayVietnam2016: Kubernetes State-of-the-art Container Management Pla...
PDF
Introduction to Kubernetes - Docker Global Mentor Week 2016
PDF
Kubernetes community demo march 16 2017
PPTX
Docker for the new Era: Introducing Docker,its components and tools
PPTX
DevOps with Kubernetes
PDF
Kubernetes Introduction
PPTX
Scalling development teams using Docker
PDF
Kubernetes - Starting with 1.2
PDF
Scaling Docker with Kubernetes
PDF
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
PDF
Kubernetes Networking
PDF
From Code to Kubernetes
PDF
Musings on Mesos: Docker, Kubernetes, and Beyond.
Kubernetes automation in production
An Introduction to Kubernetes
Introduction to kubernetes
ContainerDayVietnam2016: Kubernetes State-of-the-art Container Management Pla...
Introduction to Kubernetes - Docker Global Mentor Week 2016
Kubernetes community demo march 16 2017
Docker for the new Era: Introducing Docker,its components and tools
DevOps with Kubernetes
Kubernetes Introduction
Scalling development teams using Docker
Kubernetes - Starting with 1.2
Scaling Docker with Kubernetes
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Networking
From Code to Kubernetes
Musings on Mesos: Docker, Kubernetes, and Beyond.
Ad

Similar to Docker Madison, Introduction to Kubernetes (20)

PDF
Kubernetes
PPTX
Introduction to kubernetes
PPTX
Introduction to Kubernetes
PDF
Why kubernetes for Serverless (FaaS)
PDF
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
PDF
Using kubernetes to lose your fear of using containers
PDF
Kubernetes-Meetup
PPTX
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
PPTX
TRAINING_ABOUT_KUBERNETES_Nguyen_Si_Nhan.pptx
PDF
Kubernetes - how to orchestrate containers
PDF
Kubernetes From Scratch .pdf
PDF
Kubernetes for Java Developers
PDF
JavaOne 2016: Kubernetes introduction for Java Developers
PPTX
First steps with kubernetes
PPTX
Kubernetes
PDF
Kubernetes for Java developers
PDF
Getting started with kubernetes
PDF
Kubernetes Intro
PDF
Women Who Code Connect 2018 Conference
PPTX
Kubernetes presentation
Kubernetes
Introduction to kubernetes
Introduction to Kubernetes
Why kubernetes for Serverless (FaaS)
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
Using kubernetes to lose your fear of using containers
Kubernetes-Meetup
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
TRAINING_ABOUT_KUBERNETES_Nguyen_Si_Nhan.pptx
Kubernetes - how to orchestrate containers
Kubernetes From Scratch .pdf
Kubernetes for Java Developers
JavaOne 2016: Kubernetes introduction for Java Developers
First steps with kubernetes
Kubernetes
Kubernetes for Java developers
Getting started with kubernetes
Kubernetes Intro
Women Who Code Connect 2018 Conference
Kubernetes presentation

Recently uploaded (20)

PDF
Uptota Investor Deck - Where Africa Meets Blockchain
PPTX
Reading as a good Form of Recreation
PDF
Alethe Consulting Corporate Profile and Solution Aproach
PDF
BIOCHEM CH2 OVERVIEW OF MICROBIOLOGY.pdf
PPT
12 Things That Make People Trust a Website Instantly
PPTX
Cyber Hygine IN organizations in MSME or
PDF
📍 LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1 TERPOPULER DI INDONESIA ! 🌟
PDF
The Ikigai Template _ Recalibrate How You Spend Your Time.pdf
PPTX
module 1-Part 1.pptxdddddddddddddddddddddddddddddddddddd
PPTX
Mathew Digital SEO Checklist Guidlines 2025
PDF
Lean-Manufacturing-Tools-Techniques-and-How-To-Use-Them.pdf
PPTX
E -tech empowerment technologies PowerPoint
PDF
Session 1 (Week 1)fghjmgfdsfgthyjkhfdsadfghjkhgfdsa
PDF
Containerization lab dddddddddddddddmanual.pdf
PPTX
APNIC Report, presented at APAN 60 by Thy Boskovic
PDF
Alethe Consulting Corporate Profile and Solution Aproach
PDF
The Evolution of Traditional to New Media .pdf
PDF
Smart Home Technology for Health Monitoring (www.kiu.ac.ug)
PPTX
t_and_OpenAI_Combined_two_pressentations
PPTX
Introduction to cybersecurity and digital nettiquette
Uptota Investor Deck - Where Africa Meets Blockchain
Reading as a good Form of Recreation
Alethe Consulting Corporate Profile and Solution Aproach
BIOCHEM CH2 OVERVIEW OF MICROBIOLOGY.pdf
12 Things That Make People Trust a Website Instantly
Cyber Hygine IN organizations in MSME or
📍 LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1 TERPOPULER DI INDONESIA ! 🌟
The Ikigai Template _ Recalibrate How You Spend Your Time.pdf
module 1-Part 1.pptxdddddddddddddddddddddddddddddddddddd
Mathew Digital SEO Checklist Guidlines 2025
Lean-Manufacturing-Tools-Techniques-and-How-To-Use-Them.pdf
E -tech empowerment technologies PowerPoint
Session 1 (Week 1)fghjmgfdsfgthyjkhfdsadfghjkhgfdsa
Containerization lab dddddddddddddddmanual.pdf
APNIC Report, presented at APAN 60 by Thy Boskovic
Alethe Consulting Corporate Profile and Solution Aproach
The Evolution of Traditional to New Media .pdf
Smart Home Technology for Health Monitoring (www.kiu.ac.ug)
t_and_OpenAI_Combined_two_pressentations
Introduction to cybersecurity and digital nettiquette

Docker Madison, Introduction to Kubernetes

  • 2. Overview ● Motivation / Mission / Vision ● Architectural Overview ● Operations ● Demo
  • 3. Assumption: You already know about Docker &| have attended the other meetups or talks. I’m going to skip Docker.
  • 5. What is kubernetes? ● Greek for “Helmsman” ● Kubernetes is an open source system for managing containerized applications across multiple hosts, providing basic mechanisms for deployment, maintenance, and scaling of applications. It’s APIs are intended to serve as the foundation for an open ecosystem of tools, automations systems, and higher-level API layers. ● Kubernetes establishes robust declarative primitives for maintaining the desired state requested by the user. These primitives are the main value added by Kubernetes.
  • 6. What’s the motivation for kubernetes? Develop a set of common declarative primitives that operators can leverage to build a reliable micro-service architecture in a composable manner. Tools around this core construct “could” provide additional features, including cluster management (elasticity ...), federation, etc.
  • 7. Why? A part of this is market positioning and commercialization, while the other part is experience and opinions. Google has years of experience managing containers at scale under Borg & Omega. By exposing a subset of these features targeting specific use cases they present themselves(GCE) as the defacto cloud provider for running your container workloads to meet those use cases. It’s a legit positioning move for the shift from vm’s -> containers.
  • 8. Why micro-services? ● Breaking down the SILOs ○ State of the Art of Micro-services @adrianco: http://youtu. be/nMTaS07i3jk ● By cleanly defining the api’s between services and load balancing across those services, it enables clever deployments ○ 1:64 gets some special UI to test ○ Rolling upgrades ○ Never go down ○ Autoscale only the service that needs it. ● Portability, flexibility, speed of development .... ○ Continuous Deployment [github push -> go build -> Run] O(minutes)
  • 9. Use Case Example You are going to create a new super awesome webpage kittenpicsABC123.com, and you want to make $$$ off of it with the following requirements: ● Use Containers ● You want to continuously deploy cool new changes ○ advertising changes ● Resilient against multiple failures ● Replicated-layers that are load-balanced ● SOA++
  • 10. Front End v1 v1 v1 v1 c1 internet Mid-Tier v1 v1 v1 v1 c1 Back-end v1 v1 v1 v1 c1 kittenpicsABC123.com
  • 11. Why declarative vs. imperative? ● Common use case patterns immerge, so make them simple ● Doesn’t require a high level of understanding to get started, which reduces the barrier to entry. ● Imperative could be used in many non-standard ways that was never intended, especially if there is state. ● ...
  • 12. State Space IaaS Manage your own machines PaaS Swipe my credit card and make my .jar just work and scale I consider k8’s as a ⅔ lob towards PaaS.
  • 14. Principles & Concepts ● Design Principles ● Core Concepts ○ Pods & Containers ○ Services ○ Labels ○ Controller(s) - replication controller ○ Selector ● Other Concepts [skip for today] ○ events
  • 15. Design Principles - thockin’s crib Declarative Feedback Control loops : Controller = loop Simple Modular Legacy compatible Network-centric : IP per pod Treat machines as Cattle not Pets Open Source
  • 17. What is a POD? A pod (as in a pod of whales or pea pod) correspond to a collocated group of “containers” with shared volumes. A pod models an application-specific "logical host" in a containerized environment. It may contain one or more containers which are relatively tightly coupled -- in a pre- container world, they would have executed on the same physical or virtual host.
  • 18. Why Pods? ● Pods are tightly coupled. ● Pods facilitate data sharing, and are a group of containers that are scheduled onto the same host ○ shared mount ○ shared network namespace/IP and port space ○ higher order abstraction to the low level interface ○ Composable micro-services ● Pods abstract the gritty details of container ● Unit of scheduling
  • 19. What are Services? Yet Another Reuse of Nomenclature In-order-to Confuse Everyone pirate speak - (YAR-NICE)
  • 20. What are Services? 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 goal of services is to provide a bridge for non-Kubernetes-native applications to access backends without the need to write code that is specific to Kubernetes. A service offers clients an IP and port pair which, when accessed, redirects to the appropriate backends. The set of pods targetted is determined by a label selector. It’s a NAT’d load-balanced proxy, whose IPADDR is injected into the containers that are using that service via an environment variable.
  • 22. What are Labels? Labels are key/value pairs that are attached to objects, such as pods. Labels can be used to organize and to select subsets of objects. They are created by users at the same time as an object. Each object can have a set of key/value labels set on it, with at most one label with a particular key. "labels": { "key1" : "value1", "key2" : "value2" }
  • 23. What are Replication Controllers? A replication controller ensures that a specified number of pod "replicas" are running at any one time. If there are too many, it will kill some. If there are too few, it will start more. As opposed to just creating singleton pods or even creating pods in bulk, a replication controller replaces pods that are deleted or terminated for any reason, such as in the case of node failure.
  • 24. Replication Controller Use Cases ● Rescheduling ○ Fault tolerant ● Scaling ○ up or down cluster management tools ● Rolling Updates ○ application readiness = ? ● Multiple Release Tracks ○ stable, prod, canary
  • 25. What is a Selector? Label selectors permit very simple filtering by label keys and values. Currently, label selectors only support these forms: key1 key1 = value11 key1 != value11 key1 in (value11, value12, ...) key1 not in (value11, value12, ...)
  • 27. API Server Scheduling KCM (loops) Kubelet Proxy Deployment Master Minions cadvisor
  • 29. Runtime behavior ● apiserver ○ main entry point for *operations ● scheduler ○ matches pods to nodes. ● kube controller manager ○ node controller ■ checks machine + pod health ○ replication controller ■ verifies total count is correct. ○ … (quota) ● kubelet ○ runs pods ● proxy ○ load balancing
  • 30. Demo