SlideShare a Scribd company logo
1
Kubernetes Introduction
Rafael Benevides
benevides@redhat.com
@rafabene
http://bit.ly/kubernetes-intro
Rafael Benevides
Director of Developer Experience at Red Hat
Apache DeltaSpike P.M.C
benevides@redhat.com
@rafabene
Java Certifications:
SCJA / SCJP / SCWCD / SCBCD / SCEA
JBoss Certifications:
JBCD / JBCAA
Red Hat Certifications:
OpenShift / Containers / Ansible
Other Certifications:
SAP Netweaver / ITIL / IBM Software Quality
developers.redhat.com
http://developers.redhat.comhttp://developers.redhat.com
@rafabene
Why do you want to run your application inside containers?
@rafabene
● Lightweight footprint and minimal overhead,
● Portability across machines,
● Simplify DevOps practices,
● Speeds up Continuous Integration,
● Empower Microservices Architectures.
● Isolation
Container
Advantages
Container Engine
@rafabene
A way to run a Linux container:
$ docker run -d <image-name>
A single and isolated Linux process
running in a single machine
@rafabene
DevOps challenges for multiple containers
● How to scale?
● How to avoid port conflicts?
● How to manage them in multiple
hosts?
● What happens if a host has a
trouble?
● How to keep them running?
● How to update them?
● Where are my containers?
Node Node
Logger
Node
Node Node Node
@rafabene
Greek for “Helmsman”; also the root of the word
“Governor” (from latin: gubernator)
● Container orchestrator
● Supports multiple cloud and bare-metal environments
● Inspired by Google’s experience with containers
● Open source, written in Go
Manage applications, not machines
Meet Kubernetes
@rafabene
Version 1.7
Hosted on GitHub
1000+ contributors
52,000+ commits
25,000+ GitHub stars
Red Hat
HP
IBM
Mesosphere
Microsoft
Project Partners
CoreOS
Pivotal
SaltStack
VMWare
http://kubernetes.io/
https://github.com/kubernetes/kubernetes
Open Source community
Master
API Server
Service Layer
VirtualPhysical Private Public
Persistent
Storage
Node Node
Logger
Node
Node Node Node
Dev
Ops
SCM
(Git/Svn)
CI/CD
Automation
Routing Layer
Registry
SDN Overlay Network
Controllers
- Scheduler
- Replication
- Services
- Builds
- Routes
- Deployment
Kubernetes
OpenShift
- Deployments
- Builds
- ImageStreams
@rafabene developers.redhat.com
Kubernetes Concepts
Pod
Replication
Controller /
Deployment
Service Label
One or More Containers
Shared IP
Shared Storage Volume
Shared Resources
Shared Lifecycle
Ensures that a specified
number of pod replicas are
running at any one time
Grouping of pods, act as
one, has stable virtual IP
and DNS name
Key/Value pairs associated
with Kubernetes objects
(e.g. env=production)
@rafabene
Concept: Pod
● Group of containers
● Live and die together
● Share:
○ IP
○ Secrets
○ Labels *
○ Volumes *
* we will talk about these concepts later
Labels
Application
Administrative
console
Log collector
IP: 10.x.x.x
Volume
@rafabene
Concept: POD
Defining a POD as YAML:
apiVersion: v1
kind: Pod
metadata:
name: myPod
labels:
key: value
spec:
containers:
- name: mysql
image: username/image
- name: phpMyAdmin
image: username/image2
key: value
myPOD
mysql
phpMy..
SCM
(Git/Svn)
Master
API Server
Service Layer
VirtualPhysical Private Public
Persistent
Storage
Node Node
Logger
Node
Node Node Node
Dev
Ops
CI/CD
Automation
Routing Layer
Registry
SDN Overlay Network
Controllers
- Scheduler
- Replication
- Services
- Builds
- Routes
- Deployment
Kubernetes
OpenShift
- Deployments
- Builds
- ImageStreams
SCM
(Git/Svn)
Master
API Server
Service Layer
VirtualPhysical Private Public
Persistent
Storage
Node Node
Logger
Node
Node Node Node
Dev
Ops
CI/CD
Automation
Routing Layer
Registry
SDN Overlay Network
Controllers
- Scheduler
- Replication
- Services
- Builds
- Routes
- Deployment
Kubernetes
OpenShift
- Deployments
- Builds
- ImageStreams
SCM
(Git/Svn)
Master
API Server
Service Layer
VirtualPhysical Private Public
Persistent
Storage
Node Node
Logger
Node
Node Node Node
Dev
Ops
CI/CD
Automation
Routing Layer
Registry
SDN Overlay Network
Controllers
- Scheduler
- Replication
- Services
- Builds
- Routes
- Deployment
Kubernetes
OpenShift
- Deployments
- Builds
- ImageStreams
@rafabene
Concept: Replication Controllers / Deployment
Defining a Deployment as YAML:
apiVersion: v1
kind: Pod
metadata:
name: myPod
labels:
key: value
spec:
containers:
- name: myPod
image: username/image
ports:
- name: http
containerPort: 8080
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: myDeployment
spec:
replicas: 4
template:
metadata:
spec:
@rafabene
Concept: Labels
App: Cool
Env: Dev
Version: 1.0
App: Cool
Env: Prod
Version: 1.0
App: Cool
Env: Dev
Version: 2.0
App: Cool
Env: Prod
Version: 2.0
Everything in Kubernetes can
have a label
Node
Logger
Node
NodeNode
@rafabene
Concept: Labels
App: Cool
Env: Dev
Version: 1.0
App: Cool
Env: Prod
Version: 1.0
App: Cool
Env: Dev
Version: 2.0
App: Cool
Env: Prod
Version: 2.0
Node
Logger
Node
NodeNode
@rafabene
Concept: Labels
App: Cool
Env: Dev
Version: 1.0
App: Cool
Env: Prod
Version: 1.0
App: Cool
Env: Dev
Version: 2.0
App: Cool
Env: Prod
Version: 2.0
Node
Logger
Node
NodeNode
@rafabene
Concept: Labels
App: Cool
Env: Dev
Version: 1.0
App: Cool
Env: Prod
Version: 1.0
App: Cool
Env: Dev
Version: 2.0
App: Cool
Env: Prod
Version: 2.0
Node
Logger
Node
NodeNode
@rafabene
Concept: Labels
App: Cool
Env: Dev
Version: 1.0
App: Cool
Env: Prod
Version: 1.0
App: Cool
Env: Dev
Version: 2.0
App: Cool
Env: Prod
Version: 2.0
Node
Logger
Node
NodeNode
@rafabene
Concept: Labels
App: Cool
Env: Dev
Version: 1.0
App: Cool
Env: Dev
Version: 2.0
App: Cool
Env: Prod
Version: 1.0
App: Cool
Env: Prod
Version: 2.0
Node
Logger
Node
NodeNode
@rafabene
Concept: Labels
metadata:
name: objectName
labels:
App: Cool
Env: Dev
Version: 1.0
Defining Labels as YAML:
(can be placed in any object metadata)
App: Cool
Env: Dev
Version: 1.0
@rafabene
Node 2
POD
App: Cool
Env: Prod
Version: 1.0
POD
Service
Labels selector:
● App=Cool
● Env=Prod
IP: 172.x.x.x
App: Nice
Env: Prod
Version: 1.0
Concept: Services
Node 1
POD
@rafabene
Concept: Services
apiVersion: v1
kind: Service
metadata:
name: myService
labels:
...
spec:
ports:
- port: 80
targetPort: 80
selector:
App: Cool
Env: Prod
Defining a Service as YAML:
myService
Labels selector:
● App=Cool
● Env=Prod
IP: 172.x.x.x
@rafabene
Using Environment variables:
Using internal DNS: $ ping mysql
Service discovery inside Kubernetes
@rafabene
Other concepts
Rolling updatesPersistent Volumes
@rafabene
Admin Owned
Users Owned
Persistent Volume
GCE PD AWS LB
NFS GlusterFS
Persistent Volume Claim
POD Volume
● Admin provisions them, Users claim them
● High-level abstraction
● Pods can mount PVCs as Volumes
Concept: Persistent Volumes
@rafabene
Deployment Concept: Rolling Updates
Pod
Replication
Controller
Pod Pod Pod
App: Cool
Version: 1.0
Version: 1.0
Replicas: 4
Service
Replication
Controller
Version: 2.0
Replicas: 1
PodPod Pod Pod
App: Cool
Version: 2.0
Version: 1.0
Replicas: 3
Version: 2.0
Replicas: 2
Version: 1.0
Replicas: 2
Version: 2.0
Replicas: 3
Version: 1.0
Replicas: 1
Version: 2.0
Replicas: 4
@rafabene
Kubernetes lab
@rafabene
Application Overview
@rafabene
@rafabene
Hello World Service
- Greet
Guestbook Service
- Create
Guestbook Service -
Retrieve
@rafabene
Lab infrastructure
Hypervisor
RHEL VM Image
● OpenShift
● Kubernetes
● Docker
Container Development Kit
http://developers.redhat.com/products/cdk/download/
@rafabene
Kubernetes lab
VERY IMPORTANT
http://bit.ly/kubernetes-lab
Follow me on the Setup environment section!
developers.redhat.com
http://developers.redhat.comhttp://developers.redhat.com
@RAFABENE

More Related Content

PDF
TDC2018FLN | Trilha Containers - Redes em containers
PDF
Docker Introduction
PPTX
K8s from Zero to ~Hero~ Seasoned Beginner
PDF
JavaOne 2016: Kubernetes introduction for Java Developers
PDF
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
PPTX
Rancher master class globalized edge workloads with k3s
PDF
Canary deployment with Traefik and K3S
PPTX
Infrastrucutre as Code
TDC2018FLN | Trilha Containers - Redes em containers
Docker Introduction
K8s from Zero to ~Hero~ Seasoned Beginner
JavaOne 2016: Kubernetes introduction for Java Developers
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Rancher master class globalized edge workloads with k3s
Canary deployment with Traefik and K3S
Infrastrucutre as Code

What's hot (20)

PPTX
A basic overview of Containers
PDF
Running Kubernetes in Kubernetes
PDF
Introduction to GitHub Actions - How to easily automate and integrate with Gi...
PDF
Go for Operations
PDF
Introduction to Kubernetes - Docker Global Mentor Week 2016
PDF
4K–Kubernetes with Knative, Kafka and Kamel
PDF
Microservices with Kubernetes, Docker, and Jenkins
PDF
Puzzle ITC Talk @Docker CH meetup CI CD_with_Openshift_0.2
PDF
Introduction to Kubernetes with demo
PDF
Kubernetes extensibility
PDF
A microservice architecture based on golang
PPTX
Continuous Integration With Jenkins Docker SQL Server
PDF
Continuous (Non)-Functional Testing of Microservices on k8s
PDF
Jenkins in the real world - DevOpsCon 2017
PDF
JavaOne 2016: The Deploy Master: From Basic to Zero Downtime, Blue/Green, A/B...
PDF
Journey to the devops automation with docker kubernetes and openshift
PDF
Containerd + buildkit breakout
PDF
Okteto For Kubernetes Developer :- Container Camp 2020
PDF
Securing Your Resources with Short-Lived Certificates!
PDF
CI/CD Pipeline as a Code using Jenkins 2
A basic overview of Containers
Running Kubernetes in Kubernetes
Introduction to GitHub Actions - How to easily automate and integrate with Gi...
Go for Operations
Introduction to Kubernetes - Docker Global Mentor Week 2016
4K–Kubernetes with Knative, Kafka and Kamel
Microservices with Kubernetes, Docker, and Jenkins
Puzzle ITC Talk @Docker CH meetup CI CD_with_Openshift_0.2
Introduction to Kubernetes with demo
Kubernetes extensibility
A microservice architecture based on golang
Continuous Integration With Jenkins Docker SQL Server
Continuous (Non)-Functional Testing of Microservices on k8s
Jenkins in the real world - DevOpsCon 2017
JavaOne 2016: The Deploy Master: From Basic to Zero Downtime, Blue/Green, A/B...
Journey to the devops automation with docker kubernetes and openshift
Containerd + buildkit breakout
Okteto For Kubernetes Developer :- Container Camp 2020
Securing Your Resources with Short-Lived Certificates!
CI/CD Pipeline as a Code using Jenkins 2
Ad

Similar to TDC2018FLN | Trilha Containers - Kubernetes para usuarios Docker. (20)

PPTX
Kubernetes Introduction
PDF
Kubernetes for Java Developers
PDF
Kubernetes_Webinar_Slide_Deck.pdf
PDF
Java one kubernetes, jenkins and microservices
PDF
Javaone kubernetesjenkins
PDF
Microservices with Docker, Kubernetes, and Jenkins
PDF
Developer joy for distributed teams with CodeReady Workspaces | DevNation Tec...
PDF
Becoming A Plumber: Building Deployment Pipelines - LISA17
PDF
Becoming a Plumber: Building Deployment Pipelines - All Day DevOps
PDF
Architecting the Future: Abstractions and Metadata - BSidesKC
PDF
Kubernetes deep dive - - Huawei 2015-10
PDF
Architecting the Future: Abstractions and Metadata - KCDC
PDF
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
PPTX
Kubernetes Workshop
PDF
Architecting the Future: Abstractions and Metadata - STL SilverLinings
PPTX
Use GitLab with Chaos Engineering to Harden your Applications + OpenEBS 1.3 ...
PDF
When to use Serverless? When to use Kubernetes?
PDF
Developer-Friendly CI / CD for Kubernetes
PDF
Architecting the Future: Abstractions and Metadata - CodeStock
PDF
Red Hat Forum Benelux 2015
Kubernetes Introduction
Kubernetes for Java Developers
Kubernetes_Webinar_Slide_Deck.pdf
Java one kubernetes, jenkins and microservices
Javaone kubernetesjenkins
Microservices with Docker, Kubernetes, and Jenkins
Developer joy for distributed teams with CodeReady Workspaces | DevNation Tec...
Becoming A Plumber: Building Deployment Pipelines - LISA17
Becoming a Plumber: Building Deployment Pipelines - All Day DevOps
Architecting the Future: Abstractions and Metadata - BSidesKC
Kubernetes deep dive - - Huawei 2015-10
Architecting the Future: Abstractions and Metadata - KCDC
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes Workshop
Architecting the Future: Abstractions and Metadata - STL SilverLinings
Use GitLab with Chaos Engineering to Harden your Applications + OpenEBS 1.3 ...
When to use Serverless? When to use Kubernetes?
Developer-Friendly CI / CD for Kubernetes
Architecting the Future: Abstractions and Metadata - CodeStock
Red Hat Forum Benelux 2015
Ad

More from tdc-globalcode (20)

PDF
TDC2019 Intel Software Day - Visao Computacional e IA a servico da humanidade
PDF
TDC2019 Intel Software Day - Tecnicas de Programacao Paralela em Machine Lear...
PDF
TDC2019 Intel Software Day - ACATE - Cases de Sucesso
PDF
TDC2019 Intel Software Day - Otimizacao grafica com o Intel GPA
PDF
TDC2019 Intel Software Day - Deteccao de objetos em tempo real com OpenVino
PDF
TDC2019 Intel Software Day - OpenCV: Inteligencia artificial e Visao Computac...
PDF
TDC2019 Intel Software Day - Inferencia de IA em edge devices
PDF
Trilha BigData - Banco de Dados Orientado a Grafos na Seguranca Publica
PPT
Trilha .Net - Programacao funcional usando f#
PDF
TDC2018SP | Trilha Go - Case Easylocus
PDF
TDC2018SP | Trilha Modern Web - Para onde caminha a Web?
PDF
TDC2018SP | Trilha Go - Clean architecture em Golang
PDF
TDC2018SP | Trilha Go - "Go" tambem e linguagem de QA
PDF
TDC2018SP | Trilha Mobile - Digital Wallets - Seguranca, inovacao e tendencia
PDF
TDC2018SP | Trilha .Net - Real Time apps com Azure SignalR Service
PDF
TDC2018SP | Trilha .Net - Passado, Presente e Futuro do .NET
PDF
TDC2018SP | Trilha .Net - Novidades do C# 7 e 8
PDF
TDC2018SP | Trilha .Net - Obtendo metricas com TDD utilizando build automatiz...
PDF
TDC2018SP | Trilha .Net - .NET funcional com F#
PDF
TDC2018SP | Trilha .Net - Crie SPAs com Razor e C# usando Blazor em .Net Core
TDC2019 Intel Software Day - Visao Computacional e IA a servico da humanidade
TDC2019 Intel Software Day - Tecnicas de Programacao Paralela em Machine Lear...
TDC2019 Intel Software Day - ACATE - Cases de Sucesso
TDC2019 Intel Software Day - Otimizacao grafica com o Intel GPA
TDC2019 Intel Software Day - Deteccao de objetos em tempo real com OpenVino
TDC2019 Intel Software Day - OpenCV: Inteligencia artificial e Visao Computac...
TDC2019 Intel Software Day - Inferencia de IA em edge devices
Trilha BigData - Banco de Dados Orientado a Grafos na Seguranca Publica
Trilha .Net - Programacao funcional usando f#
TDC2018SP | Trilha Go - Case Easylocus
TDC2018SP | Trilha Modern Web - Para onde caminha a Web?
TDC2018SP | Trilha Go - Clean architecture em Golang
TDC2018SP | Trilha Go - "Go" tambem e linguagem de QA
TDC2018SP | Trilha Mobile - Digital Wallets - Seguranca, inovacao e tendencia
TDC2018SP | Trilha .Net - Real Time apps com Azure SignalR Service
TDC2018SP | Trilha .Net - Passado, Presente e Futuro do .NET
TDC2018SP | Trilha .Net - Novidades do C# 7 e 8
TDC2018SP | Trilha .Net - Obtendo metricas com TDD utilizando build automatiz...
TDC2018SP | Trilha .Net - .NET funcional com F#
TDC2018SP | Trilha .Net - Crie SPAs com Razor e C# usando Blazor em .Net Core

Recently uploaded (20)

PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Open Quiz Monsoon Mind Game Final Set.pptx
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
Pharma ospi slides which help in ospi learning
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
master seminar digital applications in india
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
Cell Structure & Organelles in detailed.
PPTX
Cardiovascular Pharmacology for pharmacy students.pptx
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
COMPUTERS AS DATA ANALYSIS IN PRECLINICAL DEVELOPMENT.pptx
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PPTX
Open Quiz Monsoon Mind Game Prelims.pptx
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Open Quiz Monsoon Mind Game Final Set.pptx
PPH.pptx obstetrics and gynecology in nursing
Pharma ospi slides which help in ospi learning
Pharmacology of Heart Failure /Pharmacotherapy of CHF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
STATICS OF THE RIGID BODIES Hibbelers.pdf
TR - Agricultural Crops Production NC III.pdf
master seminar digital applications in india
2.FourierTransform-ShortQuestionswithAnswers.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Cell Structure & Organelles in detailed.
Cardiovascular Pharmacology for pharmacy students.pptx
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Renaissance Architecture: A Journey from Faith to Humanism
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
COMPUTERS AS DATA ANALYSIS IN PRECLINICAL DEVELOPMENT.pptx
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
Open Quiz Monsoon Mind Game Prelims.pptx

TDC2018FLN | Trilha Containers - Kubernetes para usuarios Docker.