Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Introduction to Kubernetes
and why you should care
by Paris Apostolopoulos (aka javapapo)
About me
I come from Athens Greece, recently moved to
Luxembourg.
I love Java, Judo and Apple devices :P
Java EE enthusiast
Java Champion (2007) & JBoss Hero
co-Founder and admin of the first Java User Group in
Greece - www.jhug.gr
Goals
This is a soft introduction
Targeting mostly developers that now are entering
this new world of containers, microservices etc.
Save you some time from endless research and
experimentation.
Validate why kubernetes is the right framework
for the job - at least make you consider it!
Introduce basic concepts of kubernetes towards
system design and architecture.
A lot of buzzwords
a lot of trends
we are really good
at this
Microservices
Cloud
Containers
Some remarks
An new exciting world of
technologies.
Containers, microservices and the
‘cloud way’ are taking over.
There is a demand, sometimes not
clearly justified, to move existing
and new apps into this new world.
Devops is taking over but a gap is
created at the same time, ops vs
software developers.
Microservices
Containers
Cloud
Cloud : your private or a public one, a pool of
resources (machines), waiting to execute your
code.
Containers : another way of packaging -
containing applications (services) and OS
dependencies . They are expected to run on top
your ‘cloud’ machines.
Microservices : A new architectural trend on
designing and implementing apps. Separation of
concerns, decoupling, modular.
How?
How do we move from this
To this
How?
How do we move from this
To this
How?
How do we design applications that can not
make any assumptions about their runtime
environment? (filesystem/network)
How do we design applications that are
consisted of several moving parts, but can still
be deployed and orchestrated easily?
How do we design applications can move from
one cloud platform to another ?
How can we reuse our existing skills and
techniques on application design and
architecture without deep diving to other areas?
Common
misconceptions
Docker-izing your application
does not mean that you do
microservices.
2 processes (e.g wars) that
exchange JSON are not a
microservices platform.
Technical split of your good old
monolith, does not mean that you
actually moved to a microservices
architecture.
Common
misconceptions
A lot of technologies / frameworks claim to be
‘the operating system’ of the cloud.
The reality is that certain tools cover specific
areas of the overall problem.
Platforms that abstract the real hardware layer
(your good old server cluster).
Platforms that can ‘schedule’ and orchestrate
specific work on a cluster (aka schedulers)
Platforms with mix concerns that promise to act
as a ‘platform as a service’, where you will
design, host and operate your own service.
The reality
You need to invest money and skills on separate
tools and technologies.
The terms platform and infrastructure as a
service are sometimes interpreted in a very
obscure sense.
You find yourself deep diving on ops and
experimenting with OS level services rather than
your application
Currently most of the technologies are on their
infancy, ever changing and competing.
The question
Is there any technology that will abstract most of
the complexity imposed by many infrastructure
technologies?
Is there any technology that will enable me to
think again about application (parts) services and
their layout- rathern the specifics of the
underlying infrastructure?
Is there any technology that can be easy and
powerfull enough so that can be ‘setup’ by the
average Joe Developer in order to be evaluated
and then maybe use it actually?
The answer
Yes! Entering Kubernetes
Kubernetes
κυβερνήτης
the person controlling a ship (captain)
the person that controls / governs a city
Abstract View
(very abstract)
The internet
You Cloud
infrastructure
Your Containers
(services)
Kubernetes is
here!
Kubernetes
History
Google project started in 2014
10 year old experience derived from Google
internal container platform code name ‘Borg’
Project reached it’s 1.0 major release on July
2015.
Written in Go lang.
Heavily relies on Etcd
A less abstract
view
So in plain words either you have a cluster of VMs or a cluster of physical
machines, that are all Kubernetes aware, then they form a Kubernetes cluster.
Kubernetes then is the 'tool' so that you make use of the underlying docker engine
installed in each host (node) . (simplified description).
What is it?
“is an open source system for managing containerized
applications across multiple hosts, providing basic
mechanisms for deployment, maintenance, and scaling
of applications”
Is not a Infrastructure as a Service framework, it
abstracts the data center resources on a high level.
Is not a Platform as a Service framework, it can be use
as the basis so you can come up with one.
It enables you to deploy, manage and run on top of
abstracted pool of resources, your dockerized
applications.
It enables you to ‘design’ your application topology and
spread and interconnect your services with minimal or
changes to the actual service
Anatomy of a
Kubernetes Node
Each node basically runs
a number of services
(kubernetes related) and
a docker engine
We have 2 basic types of nodes
● master
● worker
The Master Node
The controller - controls and manages
the cluster
Run services of kubernetes
kubectl : command line client
rest api: rest api for communicating with the
workers
Scheduling and Replication logic
The Worker Node
The node that eventually host your
services - containers
Run services of kubernetes
kubelet : kubernetes agent (accepts commands
from master)
kubeproxy: network proxy service on a node
level
docker host
All together -
simplified
pod
Within the worker node, services will be
‘contained’ in a pod.
A pod can contain more than one
services (aka docker containers)
each pod has it’s own IP.
it is a logical host .
master schedules, replicates & creates
All together pods
one instance of
MySQL and one
Tomcat, scheduled in
different pods.
Labels
● Labels are metadata we can assign to
kubernetes resources - such as pods,services
when we create them (spin them).
● They are simple key value pairs.
● Labels are crucial to kubernetes since a lot of
core kubernetes functionality relies on
‘querying’ the cluster for ‘resources’ that have
certain label assigned! (Selectors)
we can query
the
kubernetes
cluster for all
the pods that
belong to an
application
named
‘testApp’
What if I want 3
instances of
tomcat running?
The replication
Controller
● Is responsible to maintain as many pods as they
have been requested by the user.
● It will start or kill pods depending on the replication
limit provided.
○ E.g if we ask for 3 pods running a tomcat
docker instance with a specific description,
then it will kill any attempt to spin a 4th one.
● The replication controller uses a ‘template’ which is
just a simple descriptor that describes exactly what
each pod should contain.
● We can dynamically call the replication controller of
the kubernetes cluster in order to scale up or down a
specific pod.
○ E.g I want to scale up these 3 tomcats and to
make them 6.
How I can group
these 3 pods and
load balance
them?
The Service
● A service is not - a running thing - there is no real
single load balancer.
● It is information stored in the kubernetes cluster
state and networking information propagated to all
the nodes.
● It groups a set of pods, providing a single point of
access.
● For example if we want to access the ‘RestApi’
service we no longer need to know each pod’s ip
address.
● By grouping similar pods into service(s) we
eventually solve the discoverability and connectivity
between our containers.
● A Service with 3 pods of MySQL and another
Service with 3 pods of Wildfly can ‘talk’ to each by
this single ‘domain’ name - cluster internal IP and on
predefined (if we wish ports).
The Service- env
variables?
● Once a service is declared then related
Environment Variables are accessible on the node.
● TOMCAT_SERVICE_HOST=10.0.0.11
TOMCAT_SERVICE_HOST_PORT=80
TOMCAT_PORT=tcp://10.0.0.11:6379
The Service- How?
● Every time we create a service, all the nodes of the
cluster - get aware of it.
● The kube-proxy service running on all workers
allocates a specific port.
● IP-Tables are being populated so that traffic can be
redirected to the related services
● A service is eventually a cluster wide ‘information’
that each node is aware.
Volumes
● Another powerful abstraction
● File access for your services.
● It lives as the pod lives!
● A container can die in the pod, the volume still
lives.
● The volume can point to the Node (host), pod only
or to an external file /storage provider.
Volumes
● The most important thing is to foresee the need of
the volume in your topology.
● Once you have selected the type and you have
integrated it on your app design, you won't have to
worry about, no matter how your pods or
containers run or scale.
Secrets
● Sensitive information, that containers need to read
or consume.
● Secrets are another kubernetes abstraction
● Technically they are end up as special volumes
mounted automatically so that your containers can
read their contents.
● Each entry has it’s own path.
So how I Install
kubernetes - for
the first time?
The easiest way is a local cluster - with vagrant managed
vms. But there are several other ways, as documented
here.
1. Install Vagrant on your machine, make sure it works
2. Download the latest release of kubernetes from here
(releases) e.g 1.0.6
3. Unzip the folder to a path of your choice e.g
~kubernetes_home
1. Set the following env variables on your environment
or just export them beforehand.
export KUBERNETES_PROVIDER=vagrant
export VAGRANT_DEFAULT_PROVIDER=virtualbox
export NUM_MINIONS=3
export KUBERNETES_MASTER_MEMORY=1536
export KUBERNETES_MINION_MEMORY=1024
1. Execute the following script
kubernetes_homeclusterkube-up.sh
1. Wait a bit (depending on the number of nodes) to
complete - you are done!!!
Number of
Nodes
So how do I issue
commands to my
cluster?
Kubectl is the command line tool to ‘talk’ to your cluster
master.
● Kubectl is already included in the download archive
export KUBECTL=~kubernetes_homeplatformsxxxamd64
● add KUBECTL to your $PATH, or always navigate to
the above path.
Some kubectl
commands
#Get the state of your cluster
$ kubectl cluster-info
#Get all the nodes of your cluster
$ kubectl get nodes -o wide
#Get info about the pods of your cluster
$ kubectl get pods -o wide
#Get info about the replication controllers of your cluster
$ kubectl get rc -o wide
#Get info about the services of your cluster
$ kubectl get services
#Get full config info about a Service
$ kubectl get service <NAME_OF_SERVICE> -o json
#Get the IP of a Pod
$ kubectl get pod <NAME_OF_POD> -template={{.status.podIP}}
#Delete a Pod
$ kubectl delete pod NAME
#Delete a Service
$ kubectl delete service NAME_OF_THE_SERVICE
Schedule a simple
pod
# official documentation here
# Schedule to start a pod that will contain the latest
# Wildfly Image.
$ kubectl run myjboss --image=jboss/wildfly --port=8080
# Check our created pod(s).
$ kubectl get pods
NAME READY STATUS RESTARTS
AGE
myjboss-jvqob 1/1 Running 0
3m
Schedule a simple
pod - with template
{
"kind": "Pod",
"apiVersion": "v1",
"metadata": {
"name": "anotherJboss",
"labels": {
"app": "myapp"
}
},
"spec": {
"containers": [
{
"name": "backend-core-jboss",
"image": "jboss/wildfly",
"ports": [
{
"containerPort": 8080,
"protocol": "TCP"
}
]
}
]
}
}
$ kubectl create -f ./single-pod.json
Save it as
single-pod.json
Schedule a simple
service - with
template
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "test-service"
},
"spec": {
"selector": {
"app": "myapp"
},
"ports": [
{
"protocol": "TCP",
"port": 80,
"targetPort": 8080
}
]
}
}
$ kubectl create -f ./single-service.json
Save it as
single-
service.json
Schedule a
replication
controller - with
template
{
"kind": "ReplicationController",
"apiVersion": "v1",
"metadata": {
"name": "jboss-controller"
},
"spec": {
"replicas": 2,
"selector": {
"app": "backend"
},
"template": {
"metadata": {
"labels": {
"app": "backend"
}
},
"spec": {
"volumes": null,
"containers": [
{
"name": "jboss",
"image": "jboss/wildfly",
"ports": [
{
"containerPort": 8080,
"protocol": "TCP"
}
],
"imagePullPolicy": "IfNotPresent"
}
],
"restartPolicy": "Always",
"dnsPolicy": "ClusterFirst"
}
}
}
}
$ kubectl create -f ./single-rc.json
Save it as
single-rc.json
Who is embracing
Kubernetes?
● Google Container Engine
○ You can spina a cluster of VMs that run
kubernetes in a matter of minutes
● OpenShift version 3
○ The new P.a.a.S of RedHat is based on
Kubernetes!
○ Available as a service and as private
cloud installation.
● Tectonic - by CoreOS
○ a new platform
○ CoreOS+Kubernetes
● Fabric 8
○ O.S platform based on Kubernetes
○ + extra services
● OpenStack Support
○ Murano
● Apache Mesos
○ Kubernetes
Available
documentation
and resources?
Documentation
● Official Documentation here
● Code
● Google Container Engine documentation here
● Google Group - for questions.
● kubernetes.slack.com
● StackOverflow #kubernetes
Books
● Kubernetes Up and Running Oreilly (K.H)
● Scheduling the future at cloud scale - OpenShift
● Kubernetes-book (upcoming)
Articles
● Kubernetes Design Patterns (Arun Gupta)
● Kubernetes Key Concepts (Arun Gupta)
● Recipes for deploying JavaEE Apps (Arun. Gupta)
● Intro to Kubernetes
● Kubernetes for Developers
● The new PAAS
Video
● Tech overview of Kubernetes
● Container Orchestration using CoreOS and Kubernetes (1 ,2
, 3)
Twitter accounts
related with
kubernetes - check
them out!
● #kubernetes (twitter)
● @kubernetesio
Devs
● @jbeda
● @thockin
● @brendandburns
● @TallMartin
● @kelseyhightower
● @kleban
● @asynchio
● @preillyme
● @KitMerker
● @jml3on
Other
● @tectonicStack
● @thenewstack
● @kubeweekly
● @kismatic
● @googlecloud
Well it was just a
start..
This was just a soft introduction, but you
need to understand the basic ideas and then
project them to your current or future project.
Don’t rush into every technology there is a
chance you lose your focus and forget about
the real problem, which is delivering your
app.
The power of kubernetes is that does not
distract you 100% from your application
design and topology.
It does try not to become yet another
technical milestone in order for you to reach
your end goal - which is eventually to deploy
a scalable and easily maintained application.
Thanks for
your time!
Contact :
@javapapo
javapapo@mac.com
javapapo.blogspot.com
lu.linkedin.com/in/javaneze

More Related Content

What's hot

Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
CJ Cullen
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
Winton Winton
 
Kubernetes
KubernetesKubernetes
Kubernetes
Henry He
 
Quick introduction to Kubernetes
Quick introduction to KubernetesQuick introduction to Kubernetes
Quick introduction to Kubernetes
Eduardo Garcia Moyano
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
Bob Killen
 
Kubernetes
KubernetesKubernetes
Kubernetes
Meng-Ze Lee
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
Peng Xiao
 
Docker: From Zero to Hero
Docker: From Zero to HeroDocker: From Zero to Hero
Docker: From Zero to Hero
fazalraja
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
Dongwon Kim
 
Kubernetes
KubernetesKubernetes
Kubernetes
erialc_w
 
Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)
Megan O'Keefe
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory Guide
Bytemark
 
Kubernetes PPT.pptx
Kubernetes PPT.pptxKubernetes PPT.pptx
Kubernetes PPT.pptx
ssuser0cc9131
 
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!
 
Kubernetes Architecture
 Kubernetes Architecture Kubernetes Architecture
Kubernetes Architecture
Knoldus Inc.
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
Gabriel Carro
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
Rishabh Kumar
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
Phuc Nguyen
 
Kubernetes Architecture and Introduction
Kubernetes Architecture and IntroductionKubernetes Architecture and Introduction
Kubernetes Architecture and Introduction
Stefan Schimanski
 
Kubernetes 101 for Beginners
Kubernetes 101 for BeginnersKubernetes 101 for Beginners
Kubernetes 101 for Beginners
Oktay Esgul
 

What's hot (20)

Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Quick introduction to Kubernetes
Quick introduction to KubernetesQuick introduction to Kubernetes
Quick introduction to Kubernetes
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Docker: From Zero to Hero
Docker: From Zero to HeroDocker: From Zero to Hero
Docker: From Zero to Hero
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory Guide
 
Kubernetes PPT.pptx
Kubernetes PPT.pptxKubernetes PPT.pptx
Kubernetes PPT.pptx
 
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...
 
Kubernetes Architecture
 Kubernetes Architecture Kubernetes Architecture
Kubernetes Architecture
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Kubernetes Architecture and Introduction
Kubernetes Architecture and IntroductionKubernetes Architecture and Introduction
Kubernetes Architecture and Introduction
 
Kubernetes 101 for Beginners
Kubernetes 101 for BeginnersKubernetes 101 for Beginners
Kubernetes 101 for Beginners
 

Viewers also liked

An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
Imesh Gunaratne
 
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Architecture and Introduction – Paris Kubernetes MeetupKubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
Stefan Schimanski
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
rajdeep
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with Kubernetes
Carlos Sanchez
 
Kubernetes architecture
Kubernetes architectureKubernetes architecture
Kubernetes architecture
Janakiram MSV
 
OpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetesOpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetes
Samuel Terburg
 
Red Hat OpenShift V3 Overview and Deep Dive
Red Hat OpenShift V3 Overview and Deep DiveRed Hat OpenShift V3 Overview and Deep Dive
Red Hat OpenShift V3 Overview and Deep Dive
Greg Hoelzer
 
Kubernetes Architecture v1.x
Kubernetes Architecture v1.xKubernetes Architecture v1.x
Kubernetes Architecture v1.x
Yongbok Kim
 
From Zero to Cloud: Revolutionize your Application Life Cycle with OpenShift ...
From Zero to Cloud: Revolutionize your Application Life Cycle with OpenShift ...From Zero to Cloud: Revolutionize your Application Life Cycle with OpenShift ...
From Zero to Cloud: Revolutionize your Application Life Cycle with OpenShift ...
OpenShift Origin
 
Symfony CoP: Form component
Symfony CoP: Form componentSymfony CoP: Form component
Symfony CoP: Form component
Samuel ROZE
 
Docker orchestration with Kubernetes
Docker orchestration with KubernetesDocker orchestration with Kubernetes
Docker orchestration with Kubernetes
Samuel ROZE
 
Docker and Kubernetes
Docker and KubernetesDocker and Kubernetes
Docker and Kubernetes
Shiju Varghese
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
Vishal Biyani
 
Private PaaS for the Enterprise - Apache Stratos & WSO2 Private PaaS
Private PaaS for the Enterprise - Apache Stratos & WSO2 Private PaaSPrivate PaaS for the Enterprise - Apache Stratos & WSO2 Private PaaS
Private PaaS for the Enterprise - Apache Stratos & WSO2 Private PaaS
Imesh Gunaratne
 
What's new in kubernetes 1.3?
What's new in kubernetes 1.3?What's new in kubernetes 1.3?
What's new in kubernetes 1.3?
Suraj Deshmukh
 
KubeCon EU 2016 Keynote: Kubernetes State of the Union
KubeCon EU 2016 Keynote: Kubernetes State of the UnionKubeCon EU 2016 Keynote: Kubernetes State of the Union
KubeCon EU 2016 Keynote: Kubernetes State of the Union
KubeAcademy
 
Interoperability and scalability with microservices in science
Interoperability and scalability with microservices in scienceInteroperability and scalability with microservices in science
Interoperability and scalability with microservices in science
Ola Spjuth
 
Kubernetes "Ubernetes" Cluster Federation by Quinton Hoole (Google, Inc) Huaw...
Kubernetes "Ubernetes" Cluster Federation by Quinton Hoole (Google, Inc) Huaw...Kubernetes "Ubernetes" Cluster Federation by Quinton Hoole (Google, Inc) Huaw...
Kubernetes "Ubernetes" Cluster Federation by Quinton Hoole (Google, Inc) Huaw...
Quinton Hoole
 
KubeCon EU 2016:
KubeCon EU 2016: KubeCon EU 2016:
KubeCon EU 2016:
KubeAcademy
 
What's new in Kubernetes
What's new in KubernetesWhat's new in Kubernetes
What's new in Kubernetes
Daniel Smith
 

Viewers also liked (20)

An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
 
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Architecture and Introduction – Paris Kubernetes MeetupKubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with Kubernetes
 
Kubernetes architecture
Kubernetes architectureKubernetes architecture
Kubernetes architecture
 
OpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetesOpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetes
 
Red Hat OpenShift V3 Overview and Deep Dive
Red Hat OpenShift V3 Overview and Deep DiveRed Hat OpenShift V3 Overview and Deep Dive
Red Hat OpenShift V3 Overview and Deep Dive
 
Kubernetes Architecture v1.x
Kubernetes Architecture v1.xKubernetes Architecture v1.x
Kubernetes Architecture v1.x
 
From Zero to Cloud: Revolutionize your Application Life Cycle with OpenShift ...
From Zero to Cloud: Revolutionize your Application Life Cycle with OpenShift ...From Zero to Cloud: Revolutionize your Application Life Cycle with OpenShift ...
From Zero to Cloud: Revolutionize your Application Life Cycle with OpenShift ...
 
Symfony CoP: Form component
Symfony CoP: Form componentSymfony CoP: Form component
Symfony CoP: Form component
 
Docker orchestration with Kubernetes
Docker orchestration with KubernetesDocker orchestration with Kubernetes
Docker orchestration with Kubernetes
 
Docker and Kubernetes
Docker and KubernetesDocker and Kubernetes
Docker and Kubernetes
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Private PaaS for the Enterprise - Apache Stratos & WSO2 Private PaaS
Private PaaS for the Enterprise - Apache Stratos & WSO2 Private PaaSPrivate PaaS for the Enterprise - Apache Stratos & WSO2 Private PaaS
Private PaaS for the Enterprise - Apache Stratos & WSO2 Private PaaS
 
What's new in kubernetes 1.3?
What's new in kubernetes 1.3?What's new in kubernetes 1.3?
What's new in kubernetes 1.3?
 
KubeCon EU 2016 Keynote: Kubernetes State of the Union
KubeCon EU 2016 Keynote: Kubernetes State of the UnionKubeCon EU 2016 Keynote: Kubernetes State of the Union
KubeCon EU 2016 Keynote: Kubernetes State of the Union
 
Interoperability and scalability with microservices in science
Interoperability and scalability with microservices in scienceInteroperability and scalability with microservices in science
Interoperability and scalability with microservices in science
 
Kubernetes "Ubernetes" Cluster Federation by Quinton Hoole (Google, Inc) Huaw...
Kubernetes "Ubernetes" Cluster Federation by Quinton Hoole (Google, Inc) Huaw...Kubernetes "Ubernetes" Cluster Federation by Quinton Hoole (Google, Inc) Huaw...
Kubernetes "Ubernetes" Cluster Federation by Quinton Hoole (Google, Inc) Huaw...
 
KubeCon EU 2016:
KubeCon EU 2016: KubeCon EU 2016:
KubeCon EU 2016:
 
What's new in Kubernetes
What's new in KubernetesWhat's new in Kubernetes
What's new in Kubernetes
 

Similar to Introduction to Kubernetes

stupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdfstupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdf
DaniloQueirozMota
 
prodops.io k8s presentation
prodops.io k8s presentationprodops.io k8s presentation
prodops.io k8s presentation
Prodops.io
 
Google Cloud Platform Kubernetes Workshop IYTE
Google Cloud Platform Kubernetes Workshop IYTEGoogle Cloud Platform Kubernetes Workshop IYTE
Google Cloud Platform Kubernetes Workshop IYTE
Gokhan Boranalp
 
Kubernetes Architecture with Components
 Kubernetes Architecture with Components Kubernetes Architecture with Components
Kubernetes Architecture with Components
Ajeet Singh
 
Container Orchestration with Docker Swarm and Kubernetes
Container Orchestration with Docker Swarm and KubernetesContainer Orchestration with Docker Swarm and Kubernetes
Container Orchestration with Docker Swarm and Kubernetes
Will Hall
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
Meiyappan Kannappa
 
Kubernetes and CoreOS @ Athens Docker meetup
Kubernetes and CoreOS @ Athens Docker meetupKubernetes and CoreOS @ Athens Docker meetup
Kubernetes and CoreOS @ Athens Docker meetup
Mist.io
 
modern-guide-to-container-monitoring-and-orchestration.pdf
modern-guide-to-container-monitoring-and-orchestration.pdfmodern-guide-to-container-monitoring-and-orchestration.pdf
modern-guide-to-container-monitoring-and-orchestration.pdf
Guillaume Kpotufe
 
Cloud technology with practical knowledge
Cloud technology with practical knowledgeCloud technology with practical knowledge
Cloud technology with practical knowledge
AnshikaNigam8
 
Docker Madison, Introduction to Kubernetes
Docker Madison, Introduction to KubernetesDocker Madison, Introduction to Kubernetes
Docker Madison, Introduction to Kubernetes
Timothy St. Clair
 
Kubernetes Cluster vs Nodes vs Pods vs Containers Comparison
Kubernetes Cluster vs Nodes vs Pods vs Containers ComparisonKubernetes Cluster vs Nodes vs Pods vs Containers Comparison
Kubernetes Cluster vs Nodes vs Pods vs Containers Comparison
jeetendra mandal
 
Getting started with google kubernetes engine
Getting started with google kubernetes engineGetting started with google kubernetes engine
Getting started with google kubernetes engine
Shreya Pohekar
 
Spring, Functions, Serverless and You
Spring, Functions, Serverless and YouSpring, Functions, Serverless and You
Spring, Functions, Serverless and You
VMware Tanzu
 
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
 
MongoDB Ops Manager + Kubernetes
MongoDB Ops Manager + KubernetesMongoDB Ops Manager + Kubernetes
MongoDB Ops Manager + Kubernetes
MongoDB
 
Kubernetes
KubernetesKubernetes
Kubernetes
Lhouceine OUHAMZA
 
Kubernetes intro
Kubernetes introKubernetes intro
Kubernetes intro
Pravin Magdum
 
Kubernetes overview and Exploitation
Kubernetes overview and ExploitationKubernetes overview and Exploitation
Kubernetes overview and Exploitation
OWASPSeasides
 
Kubernetes
KubernetesKubernetes
Kubernetes
Anastasios Gogos
 
Kubernetes: https://youtu.be/KnjnQj-FvfQ
Kubernetes: https://youtu.be/KnjnQj-FvfQKubernetes: https://youtu.be/KnjnQj-FvfQ
Kubernetes: https://youtu.be/KnjnQj-FvfQ
Rahul Malhotra
 

Similar to Introduction to Kubernetes (20)

stupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdfstupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdf
 
prodops.io k8s presentation
prodops.io k8s presentationprodops.io k8s presentation
prodops.io k8s presentation
 
Google Cloud Platform Kubernetes Workshop IYTE
Google Cloud Platform Kubernetes Workshop IYTEGoogle Cloud Platform Kubernetes Workshop IYTE
Google Cloud Platform Kubernetes Workshop IYTE
 
Kubernetes Architecture with Components
 Kubernetes Architecture with Components Kubernetes Architecture with Components
Kubernetes Architecture with Components
 
Container Orchestration with Docker Swarm and Kubernetes
Container Orchestration with Docker Swarm and KubernetesContainer Orchestration with Docker Swarm and Kubernetes
Container Orchestration with Docker Swarm and Kubernetes
 
Docker and kubernetes
Docker and kubernetesDocker and kubernetes
Docker and kubernetes
 
Kubernetes and CoreOS @ Athens Docker meetup
Kubernetes and CoreOS @ Athens Docker meetupKubernetes and CoreOS @ Athens Docker meetup
Kubernetes and CoreOS @ Athens Docker meetup
 
modern-guide-to-container-monitoring-and-orchestration.pdf
modern-guide-to-container-monitoring-and-orchestration.pdfmodern-guide-to-container-monitoring-and-orchestration.pdf
modern-guide-to-container-monitoring-and-orchestration.pdf
 
Cloud technology with practical knowledge
Cloud technology with practical knowledgeCloud technology with practical knowledge
Cloud technology with practical knowledge
 
Docker Madison, Introduction to Kubernetes
Docker Madison, Introduction to KubernetesDocker Madison, Introduction to Kubernetes
Docker Madison, Introduction to Kubernetes
 
Kubernetes Cluster vs Nodes vs Pods vs Containers Comparison
Kubernetes Cluster vs Nodes vs Pods vs Containers ComparisonKubernetes Cluster vs Nodes vs Pods vs Containers Comparison
Kubernetes Cluster vs Nodes vs Pods vs Containers Comparison
 
Getting started with google kubernetes engine
Getting started with google kubernetes engineGetting started with google kubernetes engine
Getting started with google kubernetes engine
 
Spring, Functions, Serverless and You
Spring, Functions, Serverless and YouSpring, Functions, Serverless and You
Spring, Functions, Serverless and You
 
Nugwc k8s session-16-march-2021
Nugwc k8s session-16-march-2021Nugwc k8s session-16-march-2021
Nugwc k8s session-16-march-2021
 
MongoDB Ops Manager + Kubernetes
MongoDB Ops Manager + KubernetesMongoDB Ops Manager + Kubernetes
MongoDB Ops Manager + Kubernetes
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Kubernetes intro
Kubernetes introKubernetes intro
Kubernetes intro
 
Kubernetes overview and Exploitation
Kubernetes overview and ExploitationKubernetes overview and Exploitation
Kubernetes overview and Exploitation
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Kubernetes: https://youtu.be/KnjnQj-FvfQ
Kubernetes: https://youtu.be/KnjnQj-FvfQKubernetes: https://youtu.be/KnjnQj-FvfQ
Kubernetes: https://youtu.be/KnjnQj-FvfQ
 

Recently uploaded

What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
Stephanie Beckett
 
Verti - EMEA Insurer Innovation Award 2024
Verti - EMEA Insurer Innovation Award 2024Verti - EMEA Insurer Innovation Award 2024
Verti - EMEA Insurer Innovation Award 2024
The Digital Insurer
 
The Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU CampusesThe Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU Campuses
Larry Smarr
 
How Netflix Builds High Performance Applications at Global Scale
How Netflix Builds High Performance Applications at Global ScaleHow Netflix Builds High Performance Applications at Global Scale
How Netflix Builds High Performance Applications at Global Scale
ScyllaDB
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Mydbops
 
Observability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetryObservability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetry
Eric D. Schabell
 
Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
BookNet Canada
 
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Erasmo Purificato
 
MYIR Product Brochure - A Global Provider of Embedded SOMs & Solutions
MYIR Product Brochure - A Global Provider of Embedded SOMs & SolutionsMYIR Product Brochure - A Global Provider of Embedded SOMs & Solutions
MYIR Product Brochure - A Global Provider of Embedded SOMs & Solutions
Linda Zhang
 
Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
Aurora Consulting
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
HackersList
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
Stephanie Beckett
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
Kief Morris
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
Yevgen Sysoyev
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
huseindihon
 
How to Avoid Learning the Linux-Kernel Memory Model
How to Avoid Learning the Linux-Kernel Memory ModelHow to Avoid Learning the Linux-Kernel Memory Model
How to Avoid Learning the Linux-Kernel Memory Model
ScyllaDB
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
ishalveerrandhawa1
 
Knowledge and Prompt Engineering Part 2 Focus on Prompt Design Approaches
Knowledge and Prompt Engineering Part 2 Focus on Prompt Design ApproachesKnowledge and Prompt Engineering Part 2 Focus on Prompt Design Approaches
Knowledge and Prompt Engineering Part 2 Focus on Prompt Design Approaches
Earley Information Science
 
AC Atlassian Coimbatore Session Slides( 22/06/2024)
AC Atlassian Coimbatore Session Slides( 22/06/2024)AC Atlassian Coimbatore Session Slides( 22/06/2024)
AC Atlassian Coimbatore Session Slides( 22/06/2024)
apoorva2579
 
HTTP Adaptive Streaming – Quo Vadis (2024)
HTTP Adaptive Streaming – Quo Vadis (2024)HTTP Adaptive Streaming – Quo Vadis (2024)
HTTP Adaptive Streaming – Quo Vadis (2024)
Alpen-Adria-Universität
 

Recently uploaded (20)

What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
 
Verti - EMEA Insurer Innovation Award 2024
Verti - EMEA Insurer Innovation Award 2024Verti - EMEA Insurer Innovation Award 2024
Verti - EMEA Insurer Innovation Award 2024
 
The Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU CampusesThe Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU Campuses
 
How Netflix Builds High Performance Applications at Global Scale
How Netflix Builds High Performance Applications at Global ScaleHow Netflix Builds High Performance Applications at Global Scale
How Netflix Builds High Performance Applications at Global Scale
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
 
Observability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetryObservability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetry
 
Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
 
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
 
MYIR Product Brochure - A Global Provider of Embedded SOMs & Solutions
MYIR Product Brochure - A Global Provider of Embedded SOMs & SolutionsMYIR Product Brochure - A Global Provider of Embedded SOMs & Solutions
MYIR Product Brochure - A Global Provider of Embedded SOMs & Solutions
 
Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
 
How to Avoid Learning the Linux-Kernel Memory Model
How to Avoid Learning the Linux-Kernel Memory ModelHow to Avoid Learning the Linux-Kernel Memory Model
How to Avoid Learning the Linux-Kernel Memory Model
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
 
Knowledge and Prompt Engineering Part 2 Focus on Prompt Design Approaches
Knowledge and Prompt Engineering Part 2 Focus on Prompt Design ApproachesKnowledge and Prompt Engineering Part 2 Focus on Prompt Design Approaches
Knowledge and Prompt Engineering Part 2 Focus on Prompt Design Approaches
 
AC Atlassian Coimbatore Session Slides( 22/06/2024)
AC Atlassian Coimbatore Session Slides( 22/06/2024)AC Atlassian Coimbatore Session Slides( 22/06/2024)
AC Atlassian Coimbatore Session Slides( 22/06/2024)
 
HTTP Adaptive Streaming – Quo Vadis (2024)
HTTP Adaptive Streaming – Quo Vadis (2024)HTTP Adaptive Streaming – Quo Vadis (2024)
HTTP Adaptive Streaming – Quo Vadis (2024)
 

Introduction to Kubernetes

  • 1. Introduction to Kubernetes and why you should care by Paris Apostolopoulos (aka javapapo)
  • 2. About me I come from Athens Greece, recently moved to Luxembourg. I love Java, Judo and Apple devices :P Java EE enthusiast Java Champion (2007) & JBoss Hero co-Founder and admin of the first Java User Group in Greece - www.jhug.gr
  • 3. Goals This is a soft introduction Targeting mostly developers that now are entering this new world of containers, microservices etc. Save you some time from endless research and experimentation. Validate why kubernetes is the right framework for the job - at least make you consider it! Introduce basic concepts of kubernetes towards system design and architecture.
  • 4. A lot of buzzwords a lot of trends we are really good at this Microservices Cloud Containers
  • 5. Some remarks An new exciting world of technologies. Containers, microservices and the ‘cloud way’ are taking over. There is a demand, sometimes not clearly justified, to move existing and new apps into this new world. Devops is taking over but a gap is created at the same time, ops vs software developers.
  • 6. Microservices Containers Cloud Cloud : your private or a public one, a pool of resources (machines), waiting to execute your code. Containers : another way of packaging - containing applications (services) and OS dependencies . They are expected to run on top your ‘cloud’ machines. Microservices : A new architectural trend on designing and implementing apps. Separation of concerns, decoupling, modular.
  • 7. How? How do we move from this To this
  • 8. How? How do we move from this To this
  • 9. How? How do we design applications that can not make any assumptions about their runtime environment? (filesystem/network) How do we design applications that are consisted of several moving parts, but can still be deployed and orchestrated easily? How do we design applications can move from one cloud platform to another ? How can we reuse our existing skills and techniques on application design and architecture without deep diving to other areas?
  • 10. Common misconceptions Docker-izing your application does not mean that you do microservices. 2 processes (e.g wars) that exchange JSON are not a microservices platform. Technical split of your good old monolith, does not mean that you actually moved to a microservices architecture.
  • 11. Common misconceptions A lot of technologies / frameworks claim to be ‘the operating system’ of the cloud. The reality is that certain tools cover specific areas of the overall problem. Platforms that abstract the real hardware layer (your good old server cluster). Platforms that can ‘schedule’ and orchestrate specific work on a cluster (aka schedulers) Platforms with mix concerns that promise to act as a ‘platform as a service’, where you will design, host and operate your own service.
  • 12. The reality You need to invest money and skills on separate tools and technologies. The terms platform and infrastructure as a service are sometimes interpreted in a very obscure sense. You find yourself deep diving on ops and experimenting with OS level services rather than your application Currently most of the technologies are on their infancy, ever changing and competing.
  • 13. The question Is there any technology that will abstract most of the complexity imposed by many infrastructure technologies? Is there any technology that will enable me to think again about application (parts) services and their layout- rathern the specifics of the underlying infrastructure? Is there any technology that can be easy and powerfull enough so that can be ‘setup’ by the average Joe Developer in order to be evaluated and then maybe use it actually?
  • 15. Kubernetes κυβερνήτης the person controlling a ship (captain) the person that controls / governs a city
  • 16. Abstract View (very abstract) The internet You Cloud infrastructure Your Containers (services) Kubernetes is here!
  • 17. Kubernetes History Google project started in 2014 10 year old experience derived from Google internal container platform code name ‘Borg’ Project reached it’s 1.0 major release on July 2015. Written in Go lang. Heavily relies on Etcd
  • 18. A less abstract view So in plain words either you have a cluster of VMs or a cluster of physical machines, that are all Kubernetes aware, then they form a Kubernetes cluster. Kubernetes then is the 'tool' so that you make use of the underlying docker engine installed in each host (node) . (simplified description).
  • 19. What is it? “is an open source system for managing containerized applications across multiple hosts, providing basic mechanisms for deployment, maintenance, and scaling of applications” Is not a Infrastructure as a Service framework, it abstracts the data center resources on a high level. Is not a Platform as a Service framework, it can be use as the basis so you can come up with one. It enables you to deploy, manage and run on top of abstracted pool of resources, your dockerized applications. It enables you to ‘design’ your application topology and spread and interconnect your services with minimal or changes to the actual service
  • 20. Anatomy of a Kubernetes Node Each node basically runs a number of services (kubernetes related) and a docker engine We have 2 basic types of nodes ● master ● worker
  • 21. The Master Node The controller - controls and manages the cluster Run services of kubernetes kubectl : command line client rest api: rest api for communicating with the workers Scheduling and Replication logic
  • 22. The Worker Node The node that eventually host your services - containers Run services of kubernetes kubelet : kubernetes agent (accepts commands from master) kubeproxy: network proxy service on a node level docker host
  • 24. pod Within the worker node, services will be ‘contained’ in a pod. A pod can contain more than one services (aka docker containers) each pod has it’s own IP. it is a logical host . master schedules, replicates & creates
  • 25. All together pods one instance of MySQL and one Tomcat, scheduled in different pods.
  • 26. Labels ● Labels are metadata we can assign to kubernetes resources - such as pods,services when we create them (spin them). ● They are simple key value pairs. ● Labels are crucial to kubernetes since a lot of core kubernetes functionality relies on ‘querying’ the cluster for ‘resources’ that have certain label assigned! (Selectors) we can query the kubernetes cluster for all the pods that belong to an application named ‘testApp’
  • 27. What if I want 3 instances of tomcat running?
  • 28. The replication Controller ● Is responsible to maintain as many pods as they have been requested by the user. ● It will start or kill pods depending on the replication limit provided. ○ E.g if we ask for 3 pods running a tomcat docker instance with a specific description, then it will kill any attempt to spin a 4th one. ● The replication controller uses a ‘template’ which is just a simple descriptor that describes exactly what each pod should contain. ● We can dynamically call the replication controller of the kubernetes cluster in order to scale up or down a specific pod. ○ E.g I want to scale up these 3 tomcats and to make them 6.
  • 29. How I can group these 3 pods and load balance them?
  • 30. The Service ● A service is not - a running thing - there is no real single load balancer. ● It is information stored in the kubernetes cluster state and networking information propagated to all the nodes. ● It groups a set of pods, providing a single point of access. ● For example if we want to access the ‘RestApi’ service we no longer need to know each pod’s ip address. ● By grouping similar pods into service(s) we eventually solve the discoverability and connectivity between our containers. ● A Service with 3 pods of MySQL and another Service with 3 pods of Wildfly can ‘talk’ to each by this single ‘domain’ name - cluster internal IP and on predefined (if we wish ports).
  • 31. The Service- env variables? ● Once a service is declared then related Environment Variables are accessible on the node. ● TOMCAT_SERVICE_HOST=10.0.0.11 TOMCAT_SERVICE_HOST_PORT=80 TOMCAT_PORT=tcp://10.0.0.11:6379
  • 32. The Service- How? ● Every time we create a service, all the nodes of the cluster - get aware of it. ● The kube-proxy service running on all workers allocates a specific port. ● IP-Tables are being populated so that traffic can be redirected to the related services ● A service is eventually a cluster wide ‘information’ that each node is aware.
  • 33. Volumes ● Another powerful abstraction ● File access for your services. ● It lives as the pod lives! ● A container can die in the pod, the volume still lives. ● The volume can point to the Node (host), pod only or to an external file /storage provider.
  • 34. Volumes ● The most important thing is to foresee the need of the volume in your topology. ● Once you have selected the type and you have integrated it on your app design, you won't have to worry about, no matter how your pods or containers run or scale.
  • 35. Secrets ● Sensitive information, that containers need to read or consume. ● Secrets are another kubernetes abstraction ● Technically they are end up as special volumes mounted automatically so that your containers can read their contents. ● Each entry has it’s own path.
  • 36. So how I Install kubernetes - for the first time? The easiest way is a local cluster - with vagrant managed vms. But there are several other ways, as documented here. 1. Install Vagrant on your machine, make sure it works 2. Download the latest release of kubernetes from here (releases) e.g 1.0.6 3. Unzip the folder to a path of your choice e.g ~kubernetes_home 1. Set the following env variables on your environment or just export them beforehand. export KUBERNETES_PROVIDER=vagrant export VAGRANT_DEFAULT_PROVIDER=virtualbox export NUM_MINIONS=3 export KUBERNETES_MASTER_MEMORY=1536 export KUBERNETES_MINION_MEMORY=1024 1. Execute the following script kubernetes_homeclusterkube-up.sh 1. Wait a bit (depending on the number of nodes) to complete - you are done!!! Number of Nodes
  • 37. So how do I issue commands to my cluster? Kubectl is the command line tool to ‘talk’ to your cluster master. ● Kubectl is already included in the download archive export KUBECTL=~kubernetes_homeplatformsxxxamd64 ● add KUBECTL to your $PATH, or always navigate to the above path.
  • 38. Some kubectl commands #Get the state of your cluster $ kubectl cluster-info #Get all the nodes of your cluster $ kubectl get nodes -o wide #Get info about the pods of your cluster $ kubectl get pods -o wide #Get info about the replication controllers of your cluster $ kubectl get rc -o wide #Get info about the services of your cluster $ kubectl get services #Get full config info about a Service $ kubectl get service <NAME_OF_SERVICE> -o json #Get the IP of a Pod $ kubectl get pod <NAME_OF_POD> -template={{.status.podIP}} #Delete a Pod $ kubectl delete pod NAME #Delete a Service $ kubectl delete service NAME_OF_THE_SERVICE
  • 39. Schedule a simple pod # official documentation here # Schedule to start a pod that will contain the latest # Wildfly Image. $ kubectl run myjboss --image=jboss/wildfly --port=8080 # Check our created pod(s). $ kubectl get pods NAME READY STATUS RESTARTS AGE myjboss-jvqob 1/1 Running 0 3m
  • 40. Schedule a simple pod - with template { "kind": "Pod", "apiVersion": "v1", "metadata": { "name": "anotherJboss", "labels": { "app": "myapp" } }, "spec": { "containers": [ { "name": "backend-core-jboss", "image": "jboss/wildfly", "ports": [ { "containerPort": 8080, "protocol": "TCP" } ] } ] } } $ kubectl create -f ./single-pod.json Save it as single-pod.json
  • 41. Schedule a simple service - with template { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "test-service" }, "spec": { "selector": { "app": "myapp" }, "ports": [ { "protocol": "TCP", "port": 80, "targetPort": 8080 } ] } } $ kubectl create -f ./single-service.json Save it as single- service.json
  • 42. Schedule a replication controller - with template { "kind": "ReplicationController", "apiVersion": "v1", "metadata": { "name": "jboss-controller" }, "spec": { "replicas": 2, "selector": { "app": "backend" }, "template": { "metadata": { "labels": { "app": "backend" } }, "spec": { "volumes": null, "containers": [ { "name": "jboss", "image": "jboss/wildfly", "ports": [ { "containerPort": 8080, "protocol": "TCP" } ], "imagePullPolicy": "IfNotPresent" } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } } } $ kubectl create -f ./single-rc.json Save it as single-rc.json
  • 43. Who is embracing Kubernetes? ● Google Container Engine ○ You can spina a cluster of VMs that run kubernetes in a matter of minutes ● OpenShift version 3 ○ The new P.a.a.S of RedHat is based on Kubernetes! ○ Available as a service and as private cloud installation. ● Tectonic - by CoreOS ○ a new platform ○ CoreOS+Kubernetes ● Fabric 8 ○ O.S platform based on Kubernetes ○ + extra services ● OpenStack Support ○ Murano ● Apache Mesos ○ Kubernetes
  • 44. Available documentation and resources? Documentation ● Official Documentation here ● Code ● Google Container Engine documentation here ● Google Group - for questions. ● kubernetes.slack.com ● StackOverflow #kubernetes Books ● Kubernetes Up and Running Oreilly (K.H) ● Scheduling the future at cloud scale - OpenShift ● Kubernetes-book (upcoming) Articles ● Kubernetes Design Patterns (Arun Gupta) ● Kubernetes Key Concepts (Arun Gupta) ● Recipes for deploying JavaEE Apps (Arun. Gupta) ● Intro to Kubernetes ● Kubernetes for Developers ● The new PAAS Video ● Tech overview of Kubernetes ● Container Orchestration using CoreOS and Kubernetes (1 ,2 , 3)
  • 45. Twitter accounts related with kubernetes - check them out! ● #kubernetes (twitter) ● @kubernetesio Devs ● @jbeda ● @thockin ● @brendandburns ● @TallMartin ● @kelseyhightower ● @kleban ● @asynchio ● @preillyme ● @KitMerker ● @jml3on Other ● @tectonicStack ● @thenewstack ● @kubeweekly ● @kismatic ● @googlecloud
  • 46. Well it was just a start.. This was just a soft introduction, but you need to understand the basic ideas and then project them to your current or future project. Don’t rush into every technology there is a chance you lose your focus and forget about the real problem, which is delivering your app. The power of kubernetes is that does not distract you 100% from your application design and topology. It does try not to become yet another technical milestone in order for you to reach your end goal - which is eventually to deploy a scalable and easily maintained application.
  • 47. Thanks for your time! Contact : @javapapo javapapo@mac.com javapapo.blogspot.com lu.linkedin.com/in/javaneze

Editor's Notes

  1. Preview by tectonic -http://shop.oreilly.com/product/0636920043874.do
  2. Preview by tectonic -http://shop.oreilly.com/product/0636920043874.do
  3. Preview by tectonic -http://shop.oreilly.com/product/0636920043874.do
  4. Preview by tectonic -http://shop.oreilly.com/product/0636920043874.do