SlideShare a Scribd company logo
1
Kubernetes Introduction
Rafael Benevides & Edson Yanaga
benevides@redhat.com / yanaga@redhat.com
@rafabene / @yanaga
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
Edson Yanaga
Director of Developer Experience at Red Hat
yanaga@redhat.com
@yanaga
Java Champion
Microsoft MVP
developers.redhat.com
http://developers.redhat.comhttp://developers.redhat.com
@rafabene / @yanaga
Why do you want to run your application inside containers?
@rafabene / @yanaga
● Lightweight footprint and minimal overhead,
● Portability across machines,
● Simplify DevOps practices,
● Speeds up Continuous Integration,
● Empower Microservices Architectures.
● Isolation
Container
Advantages
Container Engine
@rafabene / @yanaga
A way to run a Linux container:
$ docker run -d <image-name>
A single and isolated Linux process
running in a single machine
@rafabene / @yanaga
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 / @yanaga
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 / @yanaga
Version 1.3
Hosted on GitHub
800+ contributors
34,000+ commits
16,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
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 / @yanaga
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 / @yanaga
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 / @yanaga
Concept: Replication Controllers
Defining a Replication Controller 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: v1
kind: ReplicationController
metadata:
name: myRC
spec:
replicas: 4
template:
metadata:
spec:
@rafabene / @yanaga
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 / @yanaga
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 / @yanaga
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 / @yanaga
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 / @yanaga
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 / @yanaga
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 / @yanaga
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 / @yanaga
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 / @yanaga
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 / @yanaga
Using Environment variables:
Using internal DNS: $ ping mysql
Service discovery inside Kubernetes
@rafabene / @yanaga
Other concepts
Rolling updatesPersistent Volumes
@rafabene / @yanaga
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 / @yanaga
Deployment Concept: Rolling Updates
Pod
Replication
Controller
Pod Pod Pod
App: Cool
Version: 1.0
Version: 1.0
Replicas: 4
Backend
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 / @yanaga
Kubernetes lab
@rafabene / @yanaga
Application Overview
@rafabene / @yanaga
@rafabene / @yanaga
Hello World Service
- Greet
Guestbook Service
- Create
Guestbook Service -
Retrieve
@rafabene / @yanaga
Lab infrastructure
Hypervisor
RHEL VM Image
● OpenShift
● Kubernetes
● Docker
Container Development Kit
http://developers.redhat.com/products/cdk/download/
@rafabene / @yanaga
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

What's hot (20)

PDF
ApacheCon Europe 2016 : CONTAINERS IN ACTION - Transform Application Delivery...
Daniel Oh
 
PPTX
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
Brian Dawson
 
PPTX
Selenium Testing your Kubernetes Apps with Machine Learning and Testim
Codefresh
 
PPTX
Deploy and upgrade Docker applications with a single click
Docker, Inc.
 
PDF
Gitlab ci, cncf.sk
Juraj Hantak
 
PPTX
OpenShift: Devops Made Easy
Bent Terp
 
PDF
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
PDF
Docker and DevOps - Why it matters
Jeremy Brown
 
PDF
Gerrit linuxtag2011
thkoch
 
PDF
CI/CD Pipeline as a Code using Jenkins 2
Mayank Patel
 
PPTX
DevOps and Continuous Delivery reference architectures for Docker
Sonatype
 
PDF
Openbar 7 - Leuven - OpenShift - The Enterprise Container Platform - Piros
Openbar
 
PDF
Continuous Delivery NYC: From GitOps to an adaptable CI/CD Pattern for Kubern...
Andrew Phillips
 
PDF
It’s 2021. Why are we -still- rebooting for patches? A look at Live Patching.
All Things Open
 
PPTX
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Slawa Giterman
 
PPTX
DevOps and Continuous Delivery Reference Architectures - Volume 2
Sonatype
 
PDF
Continuously serving the developer community with Continuous Integration and...
Thoughtworks
 
PDF
Docker Enables DevOps
Boyd Hemphill
 
PDF
OPENSHIFT CONTAINER PLATFORM CI/CD Build & Deploy
Natale Vinto
 
PDF
OpenShift As A DevOps Platform
Lalatendu Mohanty
 
ApacheCon Europe 2016 : CONTAINERS IN ACTION - Transform Application Delivery...
Daniel Oh
 
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
Brian Dawson
 
Selenium Testing your Kubernetes Apps with Machine Learning and Testim
Codefresh
 
Deploy and upgrade Docker applications with a single click
Docker, Inc.
 
Gitlab ci, cncf.sk
Juraj Hantak
 
OpenShift: Devops Made Easy
Bent Terp
 
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Docker and DevOps - Why it matters
Jeremy Brown
 
Gerrit linuxtag2011
thkoch
 
CI/CD Pipeline as a Code using Jenkins 2
Mayank Patel
 
DevOps and Continuous Delivery reference architectures for Docker
Sonatype
 
Openbar 7 - Leuven - OpenShift - The Enterprise Container Platform - Piros
Openbar
 
Continuous Delivery NYC: From GitOps to an adaptable CI/CD Pattern for Kubern...
Andrew Phillips
 
It’s 2021. Why are we -still- rebooting for patches? A look at Live Patching.
All Things Open
 
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Slawa Giterman
 
DevOps and Continuous Delivery Reference Architectures - Volume 2
Sonatype
 
Continuously serving the developer community with Continuous Integration and...
Thoughtworks
 
Docker Enables DevOps
Boyd Hemphill
 
OPENSHIFT CONTAINER PLATFORM CI/CD Build & Deploy
Natale Vinto
 
OpenShift As A DevOps Platform
Lalatendu Mohanty
 

Viewers also liked (20)

PDF
Architecting cloud-enabled applications using Spring-Integration 2.x
Edson Yanaga
 
ODP
TDC 2014 SP - E o DeltaSpike ?
Rafael Benevides
 
PDF
Enterprise Integration Patterns na nuvem com Spring Integration
Edson Yanaga
 
PDF
CDI Extensions e DeltaSpike
Rafael Benevides
 
PPTX
Essential Camel Components
Christian Posta
 
PDF
Java Craftsmanship: Lessons Learned on How to Produce Truly Beautiful Java Code
Edson Yanaga
 
PPTX
Why real integration developers ride Camels
Christian Posta
 
PDF
Cloud Native Camel Riding
Christian Posta
 
PPTX
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
Christian Posta
 
PDF
Reactive Distributed Applications with Vert.x
Red Hat Developers
 
PDF
CDK 2.0: Docker, Kubernetes, And OSE On Your Desk (Langdon White)
Red Hat Developers
 
PDF
Write Powerful Javascript Modules To Make Your Apps DRY (Brian Leathem)
Red Hat Developers
 
PDF
High Performance Data Storage in a Microservices Environment
Red Hat Developers
 
PDF
Containers: Under The Hood (Vincent Batts)
Red Hat Developers
 
PPTX
DevNexus 2015
Christian Posta
 
PDF
Chicago Microservices Integration Talk
Christian Posta
 
PDF
MicroServices for Java Developers
Red Hat Developers
 
PDF
Kubernetes for Java Developers
Red Hat Developers
 
PPT
ActiveMQ 5.9.x new features
Christian Posta
 
PDF
Polyglot Messaging with Apache ActiveMQ
Christian Posta
 
Architecting cloud-enabled applications using Spring-Integration 2.x
Edson Yanaga
 
TDC 2014 SP - E o DeltaSpike ?
Rafael Benevides
 
Enterprise Integration Patterns na nuvem com Spring Integration
Edson Yanaga
 
CDI Extensions e DeltaSpike
Rafael Benevides
 
Essential Camel Components
Christian Posta
 
Java Craftsmanship: Lessons Learned on How to Produce Truly Beautiful Java Code
Edson Yanaga
 
Why real integration developers ride Camels
Christian Posta
 
Cloud Native Camel Riding
Christian Posta
 
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
Christian Posta
 
Reactive Distributed Applications with Vert.x
Red Hat Developers
 
CDK 2.0: Docker, Kubernetes, And OSE On Your Desk (Langdon White)
Red Hat Developers
 
Write Powerful Javascript Modules To Make Your Apps DRY (Brian Leathem)
Red Hat Developers
 
High Performance Data Storage in a Microservices Environment
Red Hat Developers
 
Containers: Under The Hood (Vincent Batts)
Red Hat Developers
 
DevNexus 2015
Christian Posta
 
Chicago Microservices Integration Talk
Christian Posta
 
MicroServices for Java Developers
Red Hat Developers
 
Kubernetes for Java Developers
Red Hat Developers
 
ActiveMQ 5.9.x new features
Christian Posta
 
Polyglot Messaging with Apache ActiveMQ
Christian Posta
 
Ad

Similar to JavaOne 2016: Kubernetes introduction for Java Developers (20)

PDF
TDC2018FLN | Trilha Containers - Kubernetes para usuarios Docker.
tdc-globalcode
 
PPTX
Kubernetes Introduction
Red Hat Developers
 
PDF
Kubernetes_Webinar_Slide_Deck.pdf
AuliaFebrian2
 
PPTX
Introduction to Kubernetes
Vishal Biyani
 
PDF
Docker Madison, Introduction to Kubernetes
Timothy St. Clair
 
PDF
Java one kubernetes, jenkins and microservices
Christian Posta
 
PDF
Using kubernetes to lose your fear of using containers
josfuecas
 
PPTX
Kubernetes #1 intro
Terry Cho
 
PDF
Microservices with Docker, Kubernetes, and Jenkins
Red Hat Developers
 
PDF
Javaone kubernetesjenkins
Pravat Bhusan Parida
 
PPTX
Introduction to Kubernetes
Paris Apostolopoulos
 
PPTX
Kubernetes Workshop
loodse
 
PPTX
Kubernetes
Lhouceine OUHAMZA
 
PDF
Kubernetes - introduction
Sparkbit
 
PPTX
Kubernetes: від знайомства до використання у CI/CD
Stfalcon Meetups
 
PDF
Kubernetes Intro
Antonio Ojea Garcia
 
PPTX
A brief study on Kubernetes and its components
Ramit Surana
 
PPTX
Kubernetes overview 101
Boskey Savla
 
PPTX
Kube Overview and Kube Conformance Certification OpenSource101 Raleigh
Brad Topol
 
PDF
Scale out, with Kubernetes (k8s)
Arkadiusz Borek
 
TDC2018FLN | Trilha Containers - Kubernetes para usuarios Docker.
tdc-globalcode
 
Kubernetes Introduction
Red Hat Developers
 
Kubernetes_Webinar_Slide_Deck.pdf
AuliaFebrian2
 
Introduction to Kubernetes
Vishal Biyani
 
Docker Madison, Introduction to Kubernetes
Timothy St. Clair
 
Java one kubernetes, jenkins and microservices
Christian Posta
 
Using kubernetes to lose your fear of using containers
josfuecas
 
Kubernetes #1 intro
Terry Cho
 
Microservices with Docker, Kubernetes, and Jenkins
Red Hat Developers
 
Javaone kubernetesjenkins
Pravat Bhusan Parida
 
Introduction to Kubernetes
Paris Apostolopoulos
 
Kubernetes Workshop
loodse
 
Kubernetes
Lhouceine OUHAMZA
 
Kubernetes - introduction
Sparkbit
 
Kubernetes: від знайомства до використання у CI/CD
Stfalcon Meetups
 
Kubernetes Intro
Antonio Ojea Garcia
 
A brief study on Kubernetes and its components
Ramit Surana
 
Kubernetes overview 101
Boskey Savla
 
Kube Overview and Kube Conformance Certification OpenSource101 Raleigh
Brad Topol
 
Scale out, with Kubernetes (k8s)
Arkadiusz Borek
 
Ad

More from Rafael Benevides (7)

PDF
Docker for (Java) Developers
Rafael Benevides
 
PDF
Reunião SouJava BSB - 2005 - Java a favor do consumidor brasileiro
Rafael Benevides
 
PDF
Apostilava Java EE 5 - 2007
Rafael Benevides
 
ODP
TDC 2012 - JDF
Rafael Benevides
 
PDF
JBossInBossa 2011 - BRMS
Rafael Benevides
 
PPT
JBossinBossa 2010 - Seam
Rafael Benevides
 
PDF
Red Hat Roadshow 2009 - Drools
Rafael Benevides
 
Docker for (Java) Developers
Rafael Benevides
 
Reunião SouJava BSB - 2005 - Java a favor do consumidor brasileiro
Rafael Benevides
 
Apostilava Java EE 5 - 2007
Rafael Benevides
 
TDC 2012 - JDF
Rafael Benevides
 
JBossInBossa 2011 - BRMS
Rafael Benevides
 
JBossinBossa 2010 - Seam
Rafael Benevides
 
Red Hat Roadshow 2009 - Drools
Rafael Benevides
 

Recently uploaded (20)

PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PDF
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 

JavaOne 2016: Kubernetes introduction for Java Developers

  • 1. 1 Kubernetes Introduction Rafael Benevides & Edson Yanaga [email protected] / [email protected] @rafabene / @yanaga http://bit.ly/kubernetes-intro
  • 2. Rafael Benevides Director of Developer Experience at Red Hat Apache DeltaSpike P.M.C [email protected] @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
  • 3. Edson Yanaga Director of Developer Experience at Red Hat [email protected] @yanaga Java Champion Microsoft MVP
  • 5. @rafabene / @yanaga Why do you want to run your application inside containers?
  • 6. @rafabene / @yanaga ● Lightweight footprint and minimal overhead, ● Portability across machines, ● Simplify DevOps practices, ● Speeds up Continuous Integration, ● Empower Microservices Architectures. ● Isolation Container Advantages Container Engine
  • 7. @rafabene / @yanaga A way to run a Linux container: $ docker run -d <image-name> A single and isolated Linux process running in a single machine
  • 8. @rafabene / @yanaga 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
  • 9. @rafabene / @yanaga 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
  • 10. @rafabene / @yanaga Version 1.3 Hosted on GitHub 800+ contributors 34,000+ commits 16,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
  • 11. 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
  • 12. @rafabene developers.redhat.com Kubernetes Concepts Pod Replication Controller 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)
  • 13. @rafabene / @yanaga 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
  • 14. @rafabene / @yanaga 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..
  • 15. 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
  • 16. 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
  • 17. 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
  • 18. @rafabene / @yanaga Concept: Replication Controllers Defining a Replication Controller 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: v1 kind: ReplicationController metadata: name: myRC spec: replicas: 4 template: metadata: spec:
  • 19. @rafabene / @yanaga 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
  • 20. @rafabene / @yanaga 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
  • 21. @rafabene / @yanaga 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
  • 22. @rafabene / @yanaga 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
  • 23. @rafabene / @yanaga 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
  • 24. @rafabene / @yanaga 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
  • 25. @rafabene / @yanaga 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
  • 26. @rafabene / @yanaga 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
  • 27. @rafabene / @yanaga 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
  • 28. @rafabene / @yanaga Using Environment variables: Using internal DNS: $ ping mysql Service discovery inside Kubernetes
  • 29. @rafabene / @yanaga Other concepts Rolling updatesPersistent Volumes
  • 30. @rafabene / @yanaga 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
  • 31. @rafabene / @yanaga Deployment Concept: Rolling Updates Pod Replication Controller Pod Pod Pod App: Cool Version: 1.0 Version: 1.0 Replicas: 4 Backend 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
  • 35. @rafabene / @yanaga Hello World Service - Greet Guestbook Service - Create Guestbook Service - Retrieve
  • 36. @rafabene / @yanaga Lab infrastructure Hypervisor RHEL VM Image ● OpenShift ● Kubernetes ● Docker Container Development Kit http://developers.redhat.com/products/cdk/download/
  • 37. @rafabene / @yanaga Kubernetes lab VERY IMPORTANT http://bit.ly/kubernetes-lab Follow me on the Setup environment section!