SlideShare a Scribd company logo
Kubernetes Overview
Deploy your app with confidence
Omer Barel
DevOps Engineer
omerb@codevalue.net
@omerbarel
Omer Barel
DevOps Engineer @ CodeValue
Husband to Naama
Father to Leo & Theo
Love Whiskey & Travelling (preferably together! )
@omerbarel
http://about.me/omerbarel
Agenda
Kubernetes, Simplified
@omerbarel
Greek for helmsman
Based on Borg, Google internal container
management system
First announced by Google in mid-2014
v1.0 released in July 21st, 2015 and donated to
the development community (CNCF)
A trip down memory lane
@omerbarel
8: The numbers of characters between the “K”
and the “S” in Kubernetes, thus K8s
388,100: The number of comments on the
Kubernetes repository on GitHub during 2017
(making it the most-discussed repository)
60%: The percentage of users who use
Kubernetes in production applications (The New
Stack’s 2017 Kubernetes Survey)
72%: The percentage of enterprises who use
Kubernetes in production (The New Stack’s 2017
Kubernetes Survey)
Kubernetes by the numbers
Kubernetes in the industry
Review & improve the code
Get the community’s help
KubeCon 2017
Cloud Native
Have it your way
@omerbarel
Kubernetes is an open source system for managing
containerized applications across multiple hosts,
providing basic mechanisms for deployment,
maintenance, and scaling of applications.
What’s Kubernetes
@omerbarel
Enables you to focus on building awesome
applications while alleviating the ops stress
What’s in it for you
@omerbarel
Key Concepts
Container Orchestration
The simplicity of PaaS with the flexibility of IaaS
Enables portability across infrastructure providers
Reconciliation Loops
Drive current state → desired state
Self-healing, automagically observe
diff
act
@omerbarel
Architecture
@omerbarel
Core primitives
Pod
Container
Small group containing 1 or more tightly-
coupled containers, using shared storage
and network
Use cases:
Master & Worker (Dependency)
Data producer and provider (Shared Storage)
Close proximity for low-latency
Pod
@omerbarel
Core primitives
Small group containing 1 or more tightly-
coupled containers, using shared storage
and network
Use cases:
Master & Worker (Dependency)
Data producer and provider (Shared Storage)
Close proximity for low-latency
Pod
@omerbarel
apiVersion: v1
kind: Pod
metadata:
name: nginx-pod
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
env:
- name: NGINX_HOST
value: foobar.com
nginx-pod.yaml
Core primitives
Declaratively manage the lifecycle of
the micro service:
Creation
Scaling
Upgrade
Rollback
Termination
Contains Pods and ReplicaSets
Deployment
Deployment
ReplicaSet
@omerbarel
Pod
Container
Core primitives
Declaratively manage the lifecycle of
the micro service:
Creation
Scaling
Upgrade
Rollback
Termination
Contains Pods and ReplicaSets
Deployment
@omerbarel
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
selector:
matchLabels:
app: nginx
replicas: 2
template:
{pod definition}
nginx-deployment.yaml
Core primitives
Pods are ephemeral. wait, wait. WHAT???
They’re created and terminated
automagically, based on state changes
Their IP and name changes
Service establishes a persistent endpoint
for Pods
Allows internal and external access to
Pods (NodePort, ClusetrIP, LoadBalancer)
Labels and Selectors connects between
Service and Pods
Service
Service
@omerbarel
Pod
Container
Pod
Container
Pod
Container
Core primitives
Pods are ephemeral. wait, wait. WHAT???
They’re created and terminated
automagically, based on state changes
Their IP and name changes
Service establishes a persistent endpoint
for Pods
Allows internal and external access to
Pods (NodePort, ClusetrIP, LoadBalancer)
Labels and Selectors connects between
Service and Pods
Service
@omerbarel
apiVersion: v1
kind: Service
metadata:
name: nginx-service
labels:
app: nginx
spec:
selector:
app: nginx
ports:
- protocol: TCP
port: 8080
targetPort: 80
nginx-service.yaml
Core primitives
Ensures that some or all Nodes run a
copy of a Pod
Labels and Selectors determines
which nodes get a copy of the pod
Use cases:
Monitor Node resources (cpu, ram, etc.)
Collect logs
DaemonSet
@omerbarel
DaemonSet
Pod
Container
Core primitives
Ensures that some or all Nodes run a
copy of a Pod
Labels and Selectors determines
which nodes get a copy of the pod
Use cases:
Monitor Node resources (cpu, ram, etc.)
Collect logs
DaemonSet
@omerbarel
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: fluentd-daemonset
labels:
app: fluentd
spec:
template:
metadata:
labels:
app: fluentd
spec:
tolerations:
- key: node-role.kubernetes.io/master
effect: NoSchedule
containers:
- name: fluentd
image: fluentd
fluentd-daemonset.yaml
Core primitives
Create a pod (or pods) that executes a
specific task and terminates it upon
successful completion
Use cases:
Task scheduling
Batch processing
CronJob
@omerbarel
CronJob
Pod
Container
Core primitives
Create a pod (or pods) that executes a
specific task and terminates it upon
successful completion
Use cases:
Task scheduling
Batch processing
CronJob
@omerbarel
HelloWorld-CronJob.yaml
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: hello
spec:
schedule: "*/1 * * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: hello
image: busybox
args:
- /bin/sh
- -c
- date; echo Hello World
restartPolicy: OnFailure
Core primitives
Keep your application portable
Decouple configuration from Pod contents
Use Cases:
Attached to container at runtime:
as file
as Environment Variables
Same Pod with different configuration per
environment – dev, stage, production
ConfigMap
@omerbarel
Pod
Container
ConfigMap - Example
@omerbarel
nginx-configMap.yamlnginx-pod-env.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-configMap
labels:
app: nginx
data:
hostname: foobar.com
apiVersion: v1
kind: Pod
metadata:
name: nginx-pod
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
env:
- name: NGINX_HOST
valueFrom:
configMapKeyRef:
name: nginx-configMap
key: hostname
Core primitives
Object that contains sensitive data
Greater access control on information such
as passwords, keys and tokens
Encoded (base64), not encrypted *
Use Cases:
Attached to container at runtime:
as file
as Environment Variables
Secret
@omerbarel
Pod
Container
 Encryption of data at rest is available in version 1.7 and above
Secret - Example
@omerbarel
nginx-secret.yamlnginx-pod-secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: nginx-secret
labels:
app: nginx
type: Opaque
data:
password: MWYyZDFlMmU2N2R
apiVersion: v1
kind: Pod
metadata:
name: nginx-pod
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
env:
- name: NGINX_ADMIN_PASS
valueFrom:
secretKeyRef:
name: nginx-secret
key: password
Core primitives
Data Persistency
Toolset to provision and consume storage
Decouple storage provisioning from consumption
Decouple compute (pod) from storage
pv = PersistentVolume = storage provisioning
pvc = PersistentVolumeClaim = storage consumption
Size
Access mode
Labels & selectors
Storage class
PersistentVolumes and Claims
@omerbarel
Pod
Container
pv
pvc
Core primitives
StatefulSet
@omerbarel
When state matters
Manage set of pods
Maintains pod identity
Use case:
Ordered pod management
Stateful applications (Databases, Zookeeper)
StatefulSet
ReplicaSet
Pod-01
Container
Pod-02
Container
Pod-03
Container
StatefulSet - Example
@omerbarel
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: nginx-statefulSet
labels:
app: nginx
spec:
selector:
matchLabels:
app: nginx
serviceName: “nginx”
replicas: 3
volumeClaimTemplates:
- metadata:
name: www
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: "my-storage-class"
resources:
requests:
storage: 1Gi
template:
terminationGracePeriodSeconds: 10
{pod definition}
serviceName provides network persistency
replicas provides Pod uniqueness (unique, persistent name)
volumeClaimeTemplates provides storage persistency
terminationGracePeriodSeconds provides Pod termination control and order
nginx-StatefulSet.yaml
Summary
Containers Pods
Deployment
DaemonSet
CronJob
StatefulSet
Service
@omerbarel
app: my-app
track: stable
tier: FE
app: my-app
track: stable
tier: FE
env: devenv: dev
env: dev
app: my-app
tier: FE
track: stable
pv, pvcsecertconfigMap
@omerbarel
@omerbarel

More Related Content

What's hot

Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
Bob Killen
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
Piotr Perzyna
 
Kubernetes a comprehensive overview
Kubernetes   a comprehensive overviewKubernetes   a comprehensive overview
Kubernetes a comprehensive overview
Gabriel Carro
 
(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview
Bob Killen
 
Kubernetes 101 for Beginners
Kubernetes 101 for BeginnersKubernetes 101 for Beginners
Kubernetes 101 for Beginners
Oktay Esgul
 
Kubernetes #6 advanced scheduling
Kubernetes #6   advanced schedulingKubernetes #6   advanced scheduling
Kubernetes #6 advanced scheduling
Terry Cho
 
Kubernetes @ meetic
Kubernetes @ meeticKubernetes @ meetic
Kubernetes @ meetic
Sébastien Le Gall
 
Brief Introduction To Kubernetes
Brief Introduction To KubernetesBrief Introduction To Kubernetes
Brief Introduction To Kubernetes
Avinash Ketkar
 
Service Discovery In Kubernetes
Service Discovery In KubernetesService Discovery In Kubernetes
Service Discovery In Kubernetes
Knoldus Inc.
 
Deploying your first application with Kubernetes
Deploying your first application with KubernetesDeploying your first application with Kubernetes
Deploying your first application with Kubernetes
OVHcloud
 
Kubernetes: The Next Research Platform
Kubernetes: The Next Research PlatformKubernetes: The Next Research Platform
Kubernetes: The Next Research Platform
Bob Killen
 
Intro to cluster scheduler for Linux containers
Intro to cluster scheduler for Linux containersIntro to cluster scheduler for Linux containers
Intro to cluster scheduler for Linux containers
Kumar Gaurav
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory Guide
Bytemark
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
Rishabh Indoria
 
Kubernetes @ Squarespace: Kubernetes in the Datacenter
Kubernetes @ Squarespace: Kubernetes in the DatacenterKubernetes @ Squarespace: Kubernetes in the Datacenter
Kubernetes @ Squarespace: Kubernetes in the Datacenter
Kevin Lynch
 
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...
Edureka!
 
DevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesDevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to Kubernetes
Ronny Trommer
 
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
Bob Killen
 
Nugwc k8s session-16-march-2021
Nugwc k8s session-16-march-2021Nugwc k8s session-16-march-2021
Nugwc k8s session-16-march-2021
Avanti Patil
 

What's hot (19)

Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
 
Kubernetes a comprehensive overview
Kubernetes   a comprehensive overviewKubernetes   a comprehensive overview
Kubernetes a comprehensive overview
 
(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview
 
Kubernetes 101 for Beginners
Kubernetes 101 for BeginnersKubernetes 101 for Beginners
Kubernetes 101 for Beginners
 
Kubernetes #6 advanced scheduling
Kubernetes #6   advanced schedulingKubernetes #6   advanced scheduling
Kubernetes #6 advanced scheduling
 
Kubernetes @ meetic
Kubernetes @ meeticKubernetes @ meetic
Kubernetes @ meetic
 
Brief Introduction To Kubernetes
Brief Introduction To KubernetesBrief Introduction To Kubernetes
Brief Introduction To Kubernetes
 
Service Discovery In Kubernetes
Service Discovery In KubernetesService Discovery In Kubernetes
Service Discovery In Kubernetes
 
Deploying your first application with Kubernetes
Deploying your first application with KubernetesDeploying your first application with Kubernetes
Deploying your first application with Kubernetes
 
Kubernetes: The Next Research Platform
Kubernetes: The Next Research PlatformKubernetes: The Next Research Platform
Kubernetes: The Next Research Platform
 
Intro to cluster scheduler for Linux containers
Intro to cluster scheduler for Linux containersIntro to cluster scheduler for Linux containers
Intro to cluster scheduler for Linux containers
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory Guide
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Kubernetes @ Squarespace: Kubernetes in the Datacenter
Kubernetes @ Squarespace: Kubernetes in the DatacenterKubernetes @ Squarespace: Kubernetes in the Datacenter
Kubernetes @ Squarespace: Kubernetes in the Datacenter
 
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...
 
DevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesDevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to Kubernetes
 
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
 
Nugwc k8s session-16-march-2021
Nugwc k8s session-16-march-2021Nugwc k8s session-16-march-2021
Nugwc k8s session-16-march-2021
 

Similar to Kubernetes Overview - Deploy your app with confidence

An Introduction to Kubernetes and Continuous Delivery Fundamentals
An Introduction to Kubernetes and Continuous Delivery FundamentalsAn Introduction to Kubernetes and Continuous Delivery Fundamentals
An Introduction to Kubernetes and Continuous Delivery Fundamentals
All Things Open
 
Kubernetes for Java Developers
Kubernetes for Java DevelopersKubernetes for Java Developers
Kubernetes for Java Developers
Anthony Dahanne
 
CI/CD Across Multiple Environments
CI/CD Across Multiple EnvironmentsCI/CD Across Multiple Environments
CI/CD Across Multiple Environments
Karl Isenberg
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developer
Paul Czarkowski
 
What's new in Kubernetes
What's new in KubernetesWhat's new in Kubernetes
What's new in Kubernetes
Daniel Smith
 
Kubernetes for Java Developers
 Kubernetes for Java Developers Kubernetes for Java Developers
Kubernetes for Java Developers
Red Hat Developers
 
JavaOne 2016: Kubernetes introduction for Java Developers
JavaOne 2016: Kubernetes introduction for Java Developers JavaOne 2016: Kubernetes introduction for Java Developers
JavaOne 2016: Kubernetes introduction for Java Developers
Rafael Benevides
 
Scaling docker with kubernetes
Scaling docker with kubernetesScaling docker with kubernetes
Scaling docker with kubernetes
Liran Cohen
 
When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?
Niklas Heidloff
 
GitOps & the deployment branching models - DevOps D-day Marseille 2021
GitOps & the deployment branching models - DevOps D-day Marseille 2021GitOps & the deployment branching models - DevOps D-day Marseille 2021
GitOps & the deployment branching models - DevOps D-day Marseille 2021
SoKube
 
Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)
Megan O'Keefe
 
Kubernetes basics and hands on exercise
Kubernetes basics and hands on exerciseKubernetes basics and hands on exercise
Kubernetes basics and hands on exercise
Cloud Technology Experts
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !
Anthony Dahanne
 
Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307
Inhye Park
 
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with SpinnakerSpinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
Andrew Phillips
 
TDC2018FLN | Trilha Containers - Kubernetes para usuarios Docker.
TDC2018FLN | Trilha Containers - Kubernetes para usuarios Docker.TDC2018FLN | Trilha Containers - Kubernetes para usuarios Docker.
TDC2018FLN | Trilha Containers - Kubernetes para usuarios Docker.
tdc-globalcode
 
DockerCon 2022 - From legacy to Kubernetes, securely & quickly
DockerCon 2022 - From legacy to Kubernetes, securely & quicklyDockerCon 2022 - From legacy to Kubernetes, securely & quickly
DockerCon 2022 - From legacy to Kubernetes, securely & quickly
Eric Smalling
 
Kube Overview and Kube Conformance Certification OpenSource101 Raleigh
Kube Overview and Kube Conformance Certification OpenSource101 RaleighKube Overview and Kube Conformance Certification OpenSource101 Raleigh
Kube Overview and Kube Conformance Certification OpenSource101 Raleigh
Brad Topol
 
Kubernetes_Webinar_Slide_Deck.pdf
Kubernetes_Webinar_Slide_Deck.pdfKubernetes_Webinar_Slide_Deck.pdf
Kubernetes_Webinar_Slide_Deck.pdf
AuliaFebrian2
 
Mete Atamel
Mete AtamelMete Atamel
Mete Atamel
CodeFest
 

Similar to Kubernetes Overview - Deploy your app with confidence (20)

An Introduction to Kubernetes and Continuous Delivery Fundamentals
An Introduction to Kubernetes and Continuous Delivery FundamentalsAn Introduction to Kubernetes and Continuous Delivery Fundamentals
An Introduction to Kubernetes and Continuous Delivery Fundamentals
 
Kubernetes for Java Developers
Kubernetes for Java DevelopersKubernetes for Java Developers
Kubernetes for Java Developers
 
CI/CD Across Multiple Environments
CI/CD Across Multiple EnvironmentsCI/CD Across Multiple Environments
CI/CD Across Multiple Environments
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developer
 
What's new in Kubernetes
What's new in KubernetesWhat's new in Kubernetes
What's new in Kubernetes
 
Kubernetes for Java Developers
 Kubernetes for Java Developers Kubernetes for Java Developers
Kubernetes for Java Developers
 
JavaOne 2016: Kubernetes introduction for Java Developers
JavaOne 2016: Kubernetes introduction for Java Developers JavaOne 2016: Kubernetes introduction for Java Developers
JavaOne 2016: Kubernetes introduction for Java Developers
 
Scaling docker with kubernetes
Scaling docker with kubernetesScaling docker with kubernetes
Scaling docker with kubernetes
 
When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?
 
GitOps & the deployment branching models - DevOps D-day Marseille 2021
GitOps & the deployment branching models - DevOps D-day Marseille 2021GitOps & the deployment branching models - DevOps D-day Marseille 2021
GitOps & the deployment branching models - DevOps D-day Marseille 2021
 
Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)
 
Kubernetes basics and hands on exercise
Kubernetes basics and hands on exerciseKubernetes basics and hands on exercise
Kubernetes basics and hands on exercise
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !
 
Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307
 
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with SpinnakerSpinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
Spinnaker Summit 2018: CI/CD Patterns for Kubernetes with Spinnaker
 
TDC2018FLN | Trilha Containers - Kubernetes para usuarios Docker.
TDC2018FLN | Trilha Containers - Kubernetes para usuarios Docker.TDC2018FLN | Trilha Containers - Kubernetes para usuarios Docker.
TDC2018FLN | Trilha Containers - Kubernetes para usuarios Docker.
 
DockerCon 2022 - From legacy to Kubernetes, securely & quickly
DockerCon 2022 - From legacy to Kubernetes, securely & quicklyDockerCon 2022 - From legacy to Kubernetes, securely & quickly
DockerCon 2022 - From legacy to Kubernetes, securely & quickly
 
Kube Overview and Kube Conformance Certification OpenSource101 Raleigh
Kube Overview and Kube Conformance Certification OpenSource101 RaleighKube Overview and Kube Conformance Certification OpenSource101 Raleigh
Kube Overview and Kube Conformance Certification OpenSource101 Raleigh
 
Kubernetes_Webinar_Slide_Deck.pdf
Kubernetes_Webinar_Slide_Deck.pdfKubernetes_Webinar_Slide_Deck.pdf
Kubernetes_Webinar_Slide_Deck.pdf
 
Mete Atamel
Mete AtamelMete Atamel
Mete Atamel
 

Recently uploaded

UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
What is Master Data Management by PiLog Group
What is Master Data Management by PiLog GroupWhat is Master Data Management by PiLog Group
What is Master Data Management by PiLog Group
aymanquadri279
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Envertis Software Solutions
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Undress Baby
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 

Recently uploaded (20)

UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
What is Master Data Management by PiLog Group
What is Master Data Management by PiLog GroupWhat is Master Data Management by PiLog Group
What is Master Data Management by PiLog Group
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 

Kubernetes Overview - Deploy your app with confidence

  • 1. Kubernetes Overview Deploy your app with confidence Omer Barel DevOps Engineer omerb@codevalue.net @omerbarel
  • 2. Omer Barel DevOps Engineer @ CodeValue Husband to Naama Father to Leo & Theo Love Whiskey & Travelling (preferably together! ) @omerbarel http://about.me/omerbarel
  • 4. Greek for helmsman Based on Borg, Google internal container management system First announced by Google in mid-2014 v1.0 released in July 21st, 2015 and donated to the development community (CNCF) A trip down memory lane @omerbarel
  • 5. 8: The numbers of characters between the “K” and the “S” in Kubernetes, thus K8s 388,100: The number of comments on the Kubernetes repository on GitHub during 2017 (making it the most-discussed repository) 60%: The percentage of users who use Kubernetes in production applications (The New Stack’s 2017 Kubernetes Survey) 72%: The percentage of enterprises who use Kubernetes in production (The New Stack’s 2017 Kubernetes Survey) Kubernetes by the numbers
  • 6. Kubernetes in the industry Review & improve the code Get the community’s help KubeCon 2017 Cloud Native Have it your way @omerbarel
  • 7. Kubernetes is an open source system for managing containerized applications across multiple hosts, providing basic mechanisms for deployment, maintenance, and scaling of applications. What’s Kubernetes @omerbarel
  • 8. Enables you to focus on building awesome applications while alleviating the ops stress What’s in it for you @omerbarel
  • 9. Key Concepts Container Orchestration The simplicity of PaaS with the flexibility of IaaS Enables portability across infrastructure providers Reconciliation Loops Drive current state → desired state Self-healing, automagically observe diff act @omerbarel
  • 11. Core primitives Pod Container Small group containing 1 or more tightly- coupled containers, using shared storage and network Use cases: Master & Worker (Dependency) Data producer and provider (Shared Storage) Close proximity for low-latency Pod @omerbarel
  • 12. Core primitives Small group containing 1 or more tightly- coupled containers, using shared storage and network Use cases: Master & Worker (Dependency) Data producer and provider (Shared Storage) Close proximity for low-latency Pod @omerbarel apiVersion: v1 kind: Pod metadata: name: nginx-pod labels: app: nginx spec: containers: - name: nginx image: nginx:latest ports: - containerPort: 80 env: - name: NGINX_HOST value: foobar.com nginx-pod.yaml
  • 13. Core primitives Declaratively manage the lifecycle of the micro service: Creation Scaling Upgrade Rollback Termination Contains Pods and ReplicaSets Deployment Deployment ReplicaSet @omerbarel Pod Container
  • 14. Core primitives Declaratively manage the lifecycle of the micro service: Creation Scaling Upgrade Rollback Termination Contains Pods and ReplicaSets Deployment @omerbarel apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment labels: app: nginx spec: selector: matchLabels: app: nginx replicas: 2 template: {pod definition} nginx-deployment.yaml
  • 15. Core primitives Pods are ephemeral. wait, wait. WHAT??? They’re created and terminated automagically, based on state changes Their IP and name changes Service establishes a persistent endpoint for Pods Allows internal and external access to Pods (NodePort, ClusetrIP, LoadBalancer) Labels and Selectors connects between Service and Pods Service Service @omerbarel Pod Container Pod Container Pod Container
  • 16. Core primitives Pods are ephemeral. wait, wait. WHAT??? They’re created and terminated automagically, based on state changes Their IP and name changes Service establishes a persistent endpoint for Pods Allows internal and external access to Pods (NodePort, ClusetrIP, LoadBalancer) Labels and Selectors connects between Service and Pods Service @omerbarel apiVersion: v1 kind: Service metadata: name: nginx-service labels: app: nginx spec: selector: app: nginx ports: - protocol: TCP port: 8080 targetPort: 80 nginx-service.yaml
  • 17. Core primitives Ensures that some or all Nodes run a copy of a Pod Labels and Selectors determines which nodes get a copy of the pod Use cases: Monitor Node resources (cpu, ram, etc.) Collect logs DaemonSet @omerbarel DaemonSet Pod Container
  • 18. Core primitives Ensures that some or all Nodes run a copy of a Pod Labels and Selectors determines which nodes get a copy of the pod Use cases: Monitor Node resources (cpu, ram, etc.) Collect logs DaemonSet @omerbarel apiVersion: extensions/v1beta1 kind: DaemonSet metadata: name: fluentd-daemonset labels: app: fluentd spec: template: metadata: labels: app: fluentd spec: tolerations: - key: node-role.kubernetes.io/master effect: NoSchedule containers: - name: fluentd image: fluentd fluentd-daemonset.yaml
  • 19. Core primitives Create a pod (or pods) that executes a specific task and terminates it upon successful completion Use cases: Task scheduling Batch processing CronJob @omerbarel CronJob Pod Container
  • 20. Core primitives Create a pod (or pods) that executes a specific task and terminates it upon successful completion Use cases: Task scheduling Batch processing CronJob @omerbarel HelloWorld-CronJob.yaml apiVersion: batch/v1beta1 kind: CronJob metadata: name: hello spec: schedule: "*/1 * * * *" jobTemplate: spec: template: spec: containers: - name: hello image: busybox args: - /bin/sh - -c - date; echo Hello World restartPolicy: OnFailure
  • 21. Core primitives Keep your application portable Decouple configuration from Pod contents Use Cases: Attached to container at runtime: as file as Environment Variables Same Pod with different configuration per environment – dev, stage, production ConfigMap @omerbarel Pod Container
  • 22. ConfigMap - Example @omerbarel nginx-configMap.yamlnginx-pod-env.yaml apiVersion: v1 kind: ConfigMap metadata: name: nginx-configMap labels: app: nginx data: hostname: foobar.com apiVersion: v1 kind: Pod metadata: name: nginx-pod labels: app: nginx spec: containers: - name: nginx image: nginx:latest ports: - containerPort: 80 env: - name: NGINX_HOST valueFrom: configMapKeyRef: name: nginx-configMap key: hostname
  • 23. Core primitives Object that contains sensitive data Greater access control on information such as passwords, keys and tokens Encoded (base64), not encrypted * Use Cases: Attached to container at runtime: as file as Environment Variables Secret @omerbarel Pod Container  Encryption of data at rest is available in version 1.7 and above
  • 24. Secret - Example @omerbarel nginx-secret.yamlnginx-pod-secret.yaml apiVersion: v1 kind: Secret metadata: name: nginx-secret labels: app: nginx type: Opaque data: password: MWYyZDFlMmU2N2R apiVersion: v1 kind: Pod metadata: name: nginx-pod labels: app: nginx spec: containers: - name: nginx image: nginx:latest ports: - containerPort: 80 env: - name: NGINX_ADMIN_PASS valueFrom: secretKeyRef: name: nginx-secret key: password
  • 25. Core primitives Data Persistency Toolset to provision and consume storage Decouple storage provisioning from consumption Decouple compute (pod) from storage pv = PersistentVolume = storage provisioning pvc = PersistentVolumeClaim = storage consumption Size Access mode Labels & selectors Storage class PersistentVolumes and Claims @omerbarel Pod Container pv pvc
  • 26. Core primitives StatefulSet @omerbarel When state matters Manage set of pods Maintains pod identity Use case: Ordered pod management Stateful applications (Databases, Zookeeper) StatefulSet ReplicaSet Pod-01 Container Pod-02 Container Pod-03 Container
  • 27. StatefulSet - Example @omerbarel apiVersion: apps/v1 kind: StatefulSet metadata: name: nginx-statefulSet labels: app: nginx spec: selector: matchLabels: app: nginx serviceName: “nginx” replicas: 3 volumeClaimTemplates: - metadata: name: www spec: accessModes: [ "ReadWriteOnce" ] storageClassName: "my-storage-class" resources: requests: storage: 1Gi template: terminationGracePeriodSeconds: 10 {pod definition} serviceName provides network persistency replicas provides Pod uniqueness (unique, persistent name) volumeClaimeTemplates provides storage persistency terminationGracePeriodSeconds provides Pod termination control and order nginx-StatefulSet.yaml
  • 28. Summary Containers Pods Deployment DaemonSet CronJob StatefulSet Service @omerbarel app: my-app track: stable tier: FE app: my-app track: stable tier: FE env: devenv: dev env: dev app: my-app tier: FE track: stable pv, pvcsecertconfigMap

Editor's Notes

  1. 1
  2. 9
  3. 30