SlideShare a Scribd company logo
Intro to KubernetesMiloš Simić :: NS BigData Meetup
Plan
• What is Kubernetes
• Architecture
• Building blocks
• Where to go next
• Questions
http://www.businesscloudnews.com/2016/06/02/emc-launches-storage-provisioning-
framework-for-containers/
What is Kubernetes
• Kubernetes is an open-source system (written in Go) for automating
deployment, scaling, and management of containerized applications
• It groups containers that make up an application into logical units for easy
management and discovery.
• Kubernetes builds upon 15 years of experience of running production
workloads at Google, combined with best ideas and practices from the
community.
• Inspired and informed by Google’s experiences and internal systems (Borg
best name ever :D)
• Supports multiple cloud and bare-metal environments
• Supports multiple container runtimes
https://www.joyent.com/triton/compute
What can
Kubernetes
do
• Automatic binpacking
• Horizontal auto-scaling
• Automated rollouts and rollbacks
• Self-healing
• Application health checking
• …
• Manage applications, not
machines
http://www.businesscloudnews.com/2016/06/02/emc-launches-storage-provisioning-
framework-for-containers/
We need a cluster
• Laptop to multi-node cluster
• Hosted or self managed
• On-Premise or Cloud Bare
• Physical or Virtual Machines
• Or bunch of Raspberry PIs
Raspberry pi kubernetes cluster
Architecture
• etcd overall state of the cluster at any given
point of time.
• The Controllers create, update and delete
the resources they manage (pods, service
endpoints, etc.)
• API server provides internal and external
interface to Kubernetes.
• Scheduler tracks resource utilization on each
node to ensure that workload is not scheduled
in excess of the available resources
• Kubelet is responsible for the running state of
each node (that is, ensuring that all containers
on the node are healthy). It takes care of
starting, stopping, and maintaining application
containers (organized into pods)
https://mesosphere.com/blog/kubernetes-and-the-dcos/
Building blocks
pods
• A Pod is the basic building block of
Kubernetes–the smallest and simplest unit in
the Kubernetes object model that you create
or deploy.
• A Pod represents a running process on your
cluster.
• A Pod encapsulates an application
container (or, in some cases, multiple
containers)
• Each Pod is assigned a unique IP addres
• Containers inside a Pod can communicate
with one another using localhost
• Pods are functionally identical and therefore
ephemeral and replaceable - no saved state image from Bryan Dorsey GOTO talk
Building blocks
service and labels
• Kubernetes Pods are mortal. They are born and
when they die, they are not resurrected.
• A Kubernetes Service is an abstraction which
defines a logical set of Pods and a policy by
which to access them.
• Service has static ip address
• Load balances incoming requests across
grouped pods
• Services find their group of Pods using Labels
• A Label is a key/value pair attached to
everything and convey user-defined attributes
• Metadata with semantic meaning and
Grouping Mechanism
• Query on labels to do things like dashboards
image from Bryan Dorsey GOTO talk
Building blocks
replication controller
• Replication Controllers ensure the
specified number of Pod “replicas”
are running at any one given time.
• Controll loop
• If one Pod dies then the
Replication Controller will replace
it to maintain a total count of
specified pods
• Have one job: ensure N copies of a
pod
• if too few, start new ones
• if too many, kill some
• group == selector
image from Bryan Dorsey GOTO talk
Building blocks
volumes
• If Pods are ephemeral how can I
persist my container data across
container restarts?
• Well, Kubernetes supports the
concept of Volumes so you can use a
Volume type that is persistent.
• Look like Directories to Containers
• Volume options
• mounted local storage device such
as a disk
• network file systems (and similar
services)
• Cloud Provider Block Storage
(Google, AWS, Azure)
image from Bryan Dorsey GOTO talk
Example
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 2 # tells deployment to run 2 pods matching the template
template: # create pods using pod definition in this template
metadata:
# name is not included in the meta data as a unique name is
# generated from the deployment name
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
apiVersion: v1
kind: Service
metadata:
name: nginx-service
spec:
ports:
- port: 8000 # the port that this service should serve on
targetPort: 80
protocol: TCP
# just like the selector in the deployment,
# but this time it identifies the set of pods to load balance
# traffic to.
selector:
app: nginx
• To start working we describe our jobs in YAML or JSON
• Submit to master, he will schedule job for us somewhere in the cluster
• Pods and replication controllers could be merged into Deployments
kubectl create -f ./deployment.yaml kubectl create -f ./service.yaml
Patterns
• Canary update
• Only a part of the audience get access to the new version of the
app, while the rest still access the “old” version one.
• very useful when we want to be sure about stability in case of
any changes which may be breaking, and have big side effects.
• Rolling updates
• Rolling updates allow Deployments update to take place with
zero downtime by incrementally updating Pods instances with
new ones.
• New Pods will be scheduled on Nodes with available resources.
Where to go next
• kubernetes.io
• Google Kubernetes Engine
• Play with kubernetes
• hello Minikube, test on your
machine
• Read Borg and Omega
papers :)
https://github.com/kubernetes/minikube
Questions?
Thank you for your
attention :)
milossimicsimo@gmail.com@MilosSimicSimoMilosSimic
http://www.businesscloudnews.com/2016/06/02/emc-launches-storage-provisioning-
framework-for-containers/

More Related Content

PDF
Open shift 4 infra deep dive
PDF
Kubernetes 101
PDF
Kubernetes Introduction
PDF
What Is Helm
PDF
Introduction to kubernetes
PDF
Kubernetes
PDF
Kubernetes architecture
PDF
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Open shift 4 infra deep dive
Kubernetes 101
Kubernetes Introduction
What Is Helm
Introduction to kubernetes
Kubernetes
Kubernetes architecture
Kubernetes Concepts And Architecture Powerpoint Presentation Slides

What's hot (20)

PDF
Kubernetes Basics
PDF
WTF is GitOps and Why You Should Care?
PDF
Deploying your first application with Kubernetes
PPTX
Introduction to kubernetes
PDF
Docker Introduction
PDF
Kubernetes Docker Container Implementation Ppt PowerPoint Presentation Slide ...
PPTX
Introduction to Docker - 2017
PPTX
Kubernetes Introduction
PPTX
Kubernetes PPT.pptx
PDF
Docker vs VM | | Containerization or Virtualization - The Differences | DevOp...
PDF
Hands-On Introduction to Kubernetes at LISA17
PPTX
Kubernetes Introduction
PPTX
Intro to Helm for Kubernetes
PDF
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
PPTX
Kubernetes for Beginners: An Introductory Guide
PDF
Gitops Hands On
PDF
An intro to Kubernetes operators
PDF
Introduction to Kubernetes Workshop
PDF
Introduction to Kubernetes and Google Container Engine (GKE)
PPTX
Service Discovery In Kubernetes
Kubernetes Basics
WTF is GitOps and Why You Should Care?
Deploying your first application with Kubernetes
Introduction to kubernetes
Docker Introduction
Kubernetes Docker Container Implementation Ppt PowerPoint Presentation Slide ...
Introduction to Docker - 2017
Kubernetes Introduction
Kubernetes PPT.pptx
Docker vs VM | | Containerization or Virtualization - The Differences | DevOp...
Hands-On Introduction to Kubernetes at LISA17
Kubernetes Introduction
Intro to Helm for Kubernetes
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes for Beginners: An Introductory Guide
Gitops Hands On
An intro to Kubernetes operators
Introduction to Kubernetes Workshop
Introduction to Kubernetes and Google Container Engine (GKE)
Service Discovery In Kubernetes
Ad

Similar to Intro to kubernetes (20)

PDF
Kubernetes - Starting with 1.2
PPTX
Introduction kubernetes 2017_12_24
PDF
kubernetes.pdf
PPTX
Kubernetes Introduction
PDF
prodops.io k8s presentation
PDF
Kubernetes - introduction
PDF
Introduction to kubernetes
PPTX
Introduction to Kubernetes
PPTX
Introduction to Kubernetes
PPTX
DevOps with Kubernetes
PPTX
Kubernetes Internals
PDF
DevOps in AWS with Kubernetes
PDF
Kubernetes From Scratch .pdf
PPTX
Kubernetes overview 101
PDF
Kubernetes Intro
PPTX
Kubernetes-introduction to kubernetes for beginers.pptx
PPTX
First steps with kubernetes
PPTX
Kubernetes 101
PPTX
Kubernetes-Presentation-Syed-Murtaza-Hassan
PPTX
Kubernetes
Kubernetes - Starting with 1.2
Introduction kubernetes 2017_12_24
kubernetes.pdf
Kubernetes Introduction
prodops.io k8s presentation
Kubernetes - introduction
Introduction to kubernetes
Introduction to Kubernetes
Introduction to Kubernetes
DevOps with Kubernetes
Kubernetes Internals
DevOps in AWS with Kubernetes
Kubernetes From Scratch .pdf
Kubernetes overview 101
Kubernetes Intro
Kubernetes-introduction to kubernetes for beginers.pptx
First steps with kubernetes
Kubernetes 101
Kubernetes-Presentation-Syed-Murtaza-Hassan
Kubernetes
Ad

More from Faculty of Technical Sciences, University of Novi Sad (10)

PDF
Dynamic formation of distributed micro clouds
PDF
Distributed clouds — micro clouds
PDF
Dynamic formation of the distributed micro clouds
PDF
Towards Edge Computing as a Service: Dynamic Formation of the Micro Data-Centers
PPTX
Edge computing system for large scale distributed sensing systems
PPTX
Mcroservices with docker kubernetes, goang and grpc, overview
PDF
Kronos : A DSL for scheduled tasks based on textX
PPTX
Hackaton Keystone Big Linked Data Spain
PPTX
CLOVER: PROPERTY GRAPH BASED METADATA MANAGEMENT SERVICE
Dynamic formation of distributed micro clouds
Distributed clouds — micro clouds
Dynamic formation of the distributed micro clouds
Towards Edge Computing as a Service: Dynamic Formation of the Micro Data-Centers
Edge computing system for large scale distributed sensing systems
Mcroservices with docker kubernetes, goang and grpc, overview
Kronos : A DSL for scheduled tasks based on textX
Hackaton Keystone Big Linked Data Spain
CLOVER: PROPERTY GRAPH BASED METADATA MANAGEMENT SERVICE

Recently uploaded (20)

PPTX
Introduction to Artificial Intelligence
PPTX
ISO 45001 Occupational Health and Safety Management System
PPTX
L1 - Introduction to python Backend.pptx
PPTX
ai tools demonstartion for schools and inter college
PDF
System and Network Administraation Chapter 3
PDF
medical staffing services at VALiNTRY
PPTX
Transform Your Business with a Software ERP System
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
System and Network Administration Chapter 2
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPT
Introduction Database Management System for Course Database
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
DOCX
The Five Best AI Cover Tools in 2025.docx
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Odoo POS Development Services by CandidRoot Solutions
Introduction to Artificial Intelligence
ISO 45001 Occupational Health and Safety Management System
L1 - Introduction to python Backend.pptx
ai tools demonstartion for schools and inter college
System and Network Administraation Chapter 3
medical staffing services at VALiNTRY
Transform Your Business with a Software ERP System
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
How to Choose the Right IT Partner for Your Business in Malaysia
System and Network Administration Chapter 2
ManageIQ - Sprint 268 Review - Slide Deck
Introduction Database Management System for Course Database
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
The Five Best AI Cover Tools in 2025.docx
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Odoo POS Development Services by CandidRoot Solutions

Intro to kubernetes

  • 1. Intro to KubernetesMiloš Simić :: NS BigData Meetup
  • 2. Plan • What is Kubernetes • Architecture • Building blocks • Where to go next • Questions http://www.businesscloudnews.com/2016/06/02/emc-launches-storage-provisioning- framework-for-containers/
  • 3. What is Kubernetes • Kubernetes is an open-source system (written in Go) for automating deployment, scaling, and management of containerized applications • It groups containers that make up an application into logical units for easy management and discovery. • Kubernetes builds upon 15 years of experience of running production workloads at Google, combined with best ideas and practices from the community. • Inspired and informed by Google’s experiences and internal systems (Borg best name ever :D) • Supports multiple cloud and bare-metal environments • Supports multiple container runtimes https://www.joyent.com/triton/compute
  • 4. What can Kubernetes do • Automatic binpacking • Horizontal auto-scaling • Automated rollouts and rollbacks • Self-healing • Application health checking • … • Manage applications, not machines http://www.businesscloudnews.com/2016/06/02/emc-launches-storage-provisioning- framework-for-containers/
  • 5. We need a cluster • Laptop to multi-node cluster • Hosted or self managed • On-Premise or Cloud Bare • Physical or Virtual Machines • Or bunch of Raspberry PIs Raspberry pi kubernetes cluster
  • 6. Architecture • etcd overall state of the cluster at any given point of time. • The Controllers create, update and delete the resources they manage (pods, service endpoints, etc.) • API server provides internal and external interface to Kubernetes. • Scheduler tracks resource utilization on each node to ensure that workload is not scheduled in excess of the available resources • Kubelet is responsible for the running state of each node (that is, ensuring that all containers on the node are healthy). It takes care of starting, stopping, and maintaining application containers (organized into pods) https://mesosphere.com/blog/kubernetes-and-the-dcos/
  • 7. Building blocks pods • A Pod is the basic building block of Kubernetes–the smallest and simplest unit in the Kubernetes object model that you create or deploy. • A Pod represents a running process on your cluster. • A Pod encapsulates an application container (or, in some cases, multiple containers) • Each Pod is assigned a unique IP addres • Containers inside a Pod can communicate with one another using localhost • Pods are functionally identical and therefore ephemeral and replaceable - no saved state image from Bryan Dorsey GOTO talk
  • 8. Building blocks service and labels • Kubernetes Pods are mortal. They are born and when they die, they are not resurrected. • A Kubernetes Service is an abstraction which defines a logical set of Pods and a policy by which to access them. • Service has static ip address • Load balances incoming requests across grouped pods • Services find their group of Pods using Labels • A Label is a key/value pair attached to everything and convey user-defined attributes • Metadata with semantic meaning and Grouping Mechanism • Query on labels to do things like dashboards image from Bryan Dorsey GOTO talk
  • 9. Building blocks replication controller • Replication Controllers ensure the specified number of Pod “replicas” are running at any one given time. • Controll loop • If one Pod dies then the Replication Controller will replace it to maintain a total count of specified pods • Have one job: ensure N copies of a pod • if too few, start new ones • if too many, kill some • group == selector image from Bryan Dorsey GOTO talk
  • 10. Building blocks volumes • If Pods are ephemeral how can I persist my container data across container restarts? • Well, Kubernetes supports the concept of Volumes so you can use a Volume type that is persistent. • Look like Directories to Containers • Volume options • mounted local storage device such as a disk • network file systems (and similar services) • Cloud Provider Block Storage (Google, AWS, Azure) image from Bryan Dorsey GOTO talk
  • 11. Example apiVersion: apps/v1beta1 kind: Deployment metadata: name: nginx-deployment spec: replicas: 2 # tells deployment to run 2 pods matching the template template: # create pods using pod definition in this template metadata: # name is not included in the meta data as a unique name is # generated from the deployment name labels: app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerPort: 80 apiVersion: v1 kind: Service metadata: name: nginx-service spec: ports: - port: 8000 # the port that this service should serve on targetPort: 80 protocol: TCP # just like the selector in the deployment, # but this time it identifies the set of pods to load balance # traffic to. selector: app: nginx • To start working we describe our jobs in YAML or JSON • Submit to master, he will schedule job for us somewhere in the cluster • Pods and replication controllers could be merged into Deployments kubectl create -f ./deployment.yaml kubectl create -f ./service.yaml
  • 12. Patterns • Canary update • Only a part of the audience get access to the new version of the app, while the rest still access the “old” version one. • very useful when we want to be sure about stability in case of any changes which may be breaking, and have big side effects. • Rolling updates • Rolling updates allow Deployments update to take place with zero downtime by incrementally updating Pods instances with new ones. • New Pods will be scheduled on Nodes with available resources.
  • 13. Where to go next • kubernetes.io • Google Kubernetes Engine • Play with kubernetes • hello Minikube, test on your machine • Read Borg and Omega papers :) https://github.com/kubernetes/minikube
  • 14. Questions? Thank you for your attention :) milossimicsimo@gmail.com@MilosSimicSimoMilosSimic http://www.businesscloudnews.com/2016/06/02/emc-launches-storage-provisioning- framework-for-containers/