SlideShare une entreprise Scribd logo
1  sur  40
Télécharger pour lire hors ligne
Orchestrating Containers
Kubernetes Basics
Eueung Mulyana
http://eueung.github.io/docker-stuff/kubernetes
CodeLabs | Attribution-ShareAlike CC BY-SA
1 / 40
Outline
Kubernetes - Short Introduction
Parts & Components
Getting Started
kubectl run + kubectl expose
2 / 40
Kubernetes
Short Introduction
3 / 40
Kubernetes is an open-source platform for automating
deployment, scaling, and operations of application containers
across clusters of hosts, providing container-centric
infrastructure.
With Kubernetes, you are able to quickly and e ciently respond
to customer demand:
Deploy your applications quickly and predictably.
Scale your applications on the y.
Seamlessly roll out new features.
Optimize use of your hardware by using only the
resources you need
Kubernetes is:
portable: public, private, hybrid, multi-cloud
extensible: modular, pluggable, hookable, composable
self-healing: auto-placement, auto-restart, auto-
replication, auto-scaling
Ref: kubernetes.io
4 / 40
What is Kubernetes?
The name Kubernetes originates from Greek, meaning
"helmsman" or "pilot", and is the root of "governor" and
"cybernetic".
K8s is an abbreviation derived by replacing the 8 letters
"ubernete" with 8.
With Kubernetes you can deploy a full cluster of multi-tiered
containers (frontend, backend, etc.) with a single
con guration le and a single command (Ref).
Kubernetes
Container orchestrator
Runs and manages containers
Supports multiple cloud and bare-metal environments
Inspired and informed by Google's experiences and
internal systems
100% Open source, written in Go
Manage applications, not machines
Ref: Kubernetes Intro and Update @thockin
5 / 40
6 / 40
Architecture
A running Kubernetes cluster
contains node agents (kubelet)
and master components
(apiserver, scheduler, etc), on
top of a distributed storage
solution.
7 / 40
K8s Node
Worker / Minion
The Kubernetes node has the
services necessary to run
application containers and be
managed from the master
systems.
Each node runs container engine
e.g. Docker. This engine takes
care of the details of
downloading images and
running containers.
kubelet
kube-proxy
8 / 40
K8s Node
kubelet
The kubelet manages pods and
their containers, their images,
their volumes, etc.
kube-proxy
Each node also runs a simple
network proxy and load
balancer. This re ects services as
de ned in the Kubernetes API
(apiserver) on each node and
can do simple TCP and UDP
stream forwarding (round robin)
across a set of backends.
9 / 40
K8s Master
Control Plane
The Kubernetes control plane is
split into a set of components.
Currently they all run on a single
master node. These components
work together to provide a
uni ed view of the cluster.
etcd
All persistent master state is
stored in an instance of etcd.
This provides a great way to
store con guration data reliably.
With watch support,
coordinating components can be
noti ed very quickly of changes.
10 / 40
K8s Master
etcd
API Server
The apiserver serves up the Kubernetes API. It
is intended to be a CRUD-y server, with
most/all business logic implemented in
separate components or in plug-ins. It mainly
processes REST operations, validates them,
and updates the corresponding objects in etcd
(and eventually other stores).
11 / 40
Scheduler
The scheduler binds unscheduled pods to
nodes via the /binding API. The scheduler is
pluggable, support for multiple cluster
schedulers and user-provided schedulers in
the plan.
Controller Manager
All other cluster-level functions are currently
performed by the Controller Manager.
For instance, Endpoints objects are created
and updated by the endpoints controller, and
nodes are discovered, managed, and
monitored by the node controller. These could
eventually be split into separate components
to make them independently pluggable. The
replicationcontroller is a mechanism that is
layered on top of the simple pod API.
Kubernetes
Parts & Components
12 / 40
13 / 40
Containers
Base Asset
14 / 40
Containers
Pods
A pod is a co-located group of
containers ...
15 / 40
Containers
Pods
Pods with Volumes
A pod is a co-located group of
containers and volumes.
A volume is a directory, possibly
with some data in it, which is
accessible to a Container as part of
its lesystem.
Kubernetes volumes build upon
Docker Volumes, adding
provisioning of the volume directory
and/or device.
16 / 40
Containers
Pods
Pods with Volumes
Labels
A label is a key/value pair that is
attached to a resource, such as a
pod, to convey a user-de ned
identifying attribute.
Labels can be used to organize and
to select subsets of resources.
17 / 40
Containers
Pods
Pods with Volumes
Labels
Replication Controllers
A replication controller ensures that
a speci ed number of pod replicas
are running at any one time.
It both allows for easy scaling of
replicated systems and handles re-
creation of a pod when the
machine it is on reboots or
otherwise fails.
18 / 40
Containers
Pods
Pods with Volumes
Labels
Replication Controllers
Creating labeled pods with a
(labeled) RC
19 / 40
Containers
Pods
Pods with Volumes
Labels
Replication Controllers
Services
Services & labeled Services
A service de nes a set of pods and
a means by which to access them,
such as single stable IP address and
corresponding DNS name.
20 / 40
Containers
Pods
Pods with Volumes
Labels
Replication Controllers
Services
Kubernetes
Getting Started
21 / 40
22 / 40
node1 RPI 3
192.168.1.102
node2 RPI 2
192.168.1.101
node3 RPI 2
192.168.1.100
23 / 40
kubernetes-on-arm v0.7.0
by @luxas
$dpkg-ikube-systemd.deb
$kube-configinstall
#rpiorrpi-2,hypriotos
$gzip-dcimages.tar.gz|dockerload
$kube-configinfo
Architecture:armv7l
Kernel:Linux4.1.17
CPU:4coresx1200MHz
UsedRAMMemory:111MiB-RAMMemory:925MiB
Useddiskspace:2.4GB(2424044KB)
Freediskspace:11GB(11382472KB)
SDCard/debpackagewasbuilt:21-03-201621:06
kubernetes-on-arm: Latestcommit:1d0bbe1-Version:0.7.0
systemdversion:v215
dockerversion:v1.10.3
kubernetesclientversion:v1.2.0
24 / 40
$dockerimages
REPOSITORY TAG IMAGEID CREATED
kubernetesonarm/etcd 0.7.0 3550c0c4f205 8weeksago
kubernetesonarm/etcd latest 3550c0c4f205 8weeksago
kubernetesonarm/grafana 0.7.0 8ea26f4ef5a3 8weeksago
kubernetesonarm/grafana latest 8ea26f4ef5a3 8weeksago
kubernetesonarm/influxdb 0.7.0 447951a687c6 8weeksago
kubernetesonarm/influxdb latest 447951a687c6 8weeksago
kubernetesonarm/heapster 0.7.0 1d034674fc0e 8weeksago
kubernetesonarm/heapster latest 1d034674fc0e 8weeksago
kubernetesonarm/loadbalancer 0.7.0 6b262f2fd318 8weeksago
kubernetesonarm/loadbalancer latest 6b262f2fd318 8weeksago
kubernetesonarm/registry 0.7.0 4c9c964f89e9 8weeksago
kubernetesonarm/registry latest 4c9c964f89e9 8weeksago
kubernetesonarm/exechealthz 0.7.0 57f77542ac5c 8weeksago
kubernetesonarm/exechealthz latest 57f77542ac5c 8weeksago
kubernetesonarm/kube2sky 0.7.0 770cccac4236 8weeksago
kubernetesonarm/kube2sky latest 770cccac4236 8weeksago
kubernetesonarm/skydns 0.7.0 30ea4958f939 8weeksago
kubernetesonarm/skydns latest 30ea4958f939 8weeksago
kubernetesonarm/pause 0.7.0 05edc969256e 8weeksago
kubernetesonarm/pause latest 05edc969256e 8weeksago
kubernetesonarm/hyperkube 0.7.0 380def049467 8weeksago
kubernetesonarm/hyperkube latest 380def049467 8weeksago
kubernetesonarm/flannel 0.7.0 8a35c629399f 8weeksago
kubernetesonarm/flannel latest 8a35c629399f 8weeksago
hypriot/rpi-swarm latest c298de062190 10weeksago
$kube-configenable-master
Disablingk8sifitisrunning
Checkssoallimagesarepresent
Transferringimagestosystem-docker,ifnecessary
Copyingkubernetesonarm/etcdtosystem-docker
...
Kubernetesmasterservicesenabled
$dockerps
CONTAINERID IMAGE COMMAND CREATED
7bf736d84451 kubernetesonarm/hyperkube "/hyperkubecontrolle" 2minutesago
5560f06bcf47 kubernetesonarm/hyperkube "/hyperkubeproxy--m" 2minutesago
0fb169567946 kubernetesonarm/hyperkube "/hyperkubescheduler" 2minutesago
11c03a40412c kubernetesonarm/hyperkube "/hyperkubeapiserver" 2minutesago
ede858b35dfa kubernetesonarm/pause "/pause" 2minutesago
5e38dac4fd19 kubernetesonarm/hyperkube "/hyperkubekubelet-" 3minutesago
25 / 40
Master
$kube-configenable-worker192.168.1.102
Disablingk8sifitisrunning
Usingmasterip:192.168.1.102
Checkssoallimagesarepresent
Transferringimagestosystem-docker,ifnecessary
Copyingkubernetesonarm/flanneltosystem-docker
Createdsymlinkfrom/etc/systemd/system/multi-user.target.wants/flannel.serviceto/u
Startingworkercomponentsindockercontainers
Createdsymlinkfrom/etc/systemd/system/multi-user.target.wants/k8s-worker.serviceto
Kubernetesworkerservicesenabled
26 / 40
Worker
$kubectlgetnodes
NAME STATUS AGE
192.168.1.100 Ready 26s
192.168.1.101 Ready 7m
192.168.1.102 Ready 4h
$kubectlcluster-info
Kubernetesmasterisrunningathttp://localhost:8080
27 / 40
Check
$kubectlrunmy-nginx--image=luxas/nginx-test --replicas=3--expose--port=80
service"my-nginx"created
deployment"my-nginx"created
$kubectlgetpods
NAME READY STATUS RESTARTS AGE
k8s-master-192.168.1.102 4/4 Running 1 5h
my-nginx-3795026575-9w8mw 0/1 ContainerCreating 0 14s
my-nginx-3795026575-miz3d 0/1 ContainerCreating 0 14s
my-nginx-3795026575-zy2d4 0/1 ContainerCreating 0 14s
$kubectlgetsvc
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes 10.0.0.1 <none> 443/TCP 5h
my-nginx 10.0.0.129 <none> 80/TCP 36s
$kubectlgetdeployments
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
my-nginx 3 3 3 1 1m
$curl10.0.0.129
<p>WELCOMETONGINX</p>
28 / 40
Test #1
$kubectlrunhello-kube--image=hypriot/rpi-nano-httpd --port=80
deployment"hello-kube"created
$kubectlexposedeploymenthello-kube--type="LoadBalancer"--external-ip="192.168.1.
service"hello-kube"exposed
$kubectlgetpods-owide
NAME READY STATUS RESTARTS AGE NODE
hello-kube-1079346743-2knj3 0/1 ImagePullBackOff 0 55s 192.16
k8s-master-192.168.1.102 4/4 Running 1 8h 192.16
$kubectlgetdeployments
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
hello-kube 1 1 1 1 1m
$kubectlgetpods-owide
NAME READY STATUS RESTARTS AGE NODE
hello-kube-1079346743-2knj3 1/1 Running 0 1m 192.168.1.100
k8s-master-192.168.1.102 4/4 Running 1 8h 192.168.1.102
$kubectlgetsvc
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
hello-kube 10.0.0.197 ,192.168.1.102 80/TCP 44s
kubernetes 10.0.0.1 <none> 443/TCP 8h
$curl10.0.0.197
<html><head><title>PiarmedwithDockerbyHypriot</title>
<bodystyle="width:100%;background-color:black;">
<divid="main"style="margin:100pxauto0auto;width:800px;">
<imgsrc="pi_armed_with_docker.jpg"alt="piarmedwithdocker"style="width:800
</div>
</body></html>
29 / 40
Test #2
$kubectlrunhello-kube--image=hypriot/rpi-nano-httpd --replicas=2--port=80
deployment"hello-kube"created
$kubectlexposedeploymenthello-kube--type="LoadBalancer"--external-ip="192.168.1.
service"hello-kube"exposed
$kubectlgetsvc
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
hello-kube 10.0.0.221 ,192.168.1.102 80/TCP 10s
kubernetes 10.0.0.1 <none> 443/TCP 8h
$kubectlgetpods-owide
NAME READY STATUS RESTARTS AGE NODE
hello-kube-1079346743-44yig 1/1 Running 0 1m 192.168.1.100
hello-kube-1079346743-upzxy 1/1 Running 0 1m 192.168.1.101
k8s-master-192.168.1.102 4/4 Running 1 8h 192.168.1.102
$curl10.0.0.221
$curl192.168.1.102
<html><head><title>PiarmedwithDockerbyHypriot</title>
<bodystyle="width:100%;background-color:black;">
<divid="main"style="margin:100pxauto0auto;width:800px;">
<imgsrc="pi_armed_with_docker.jpg"alt="piarmedwithdocker"style="width:800
</div>
</body></html>
30 / 40
Test #3
$kubectlrunhello-kube--image=hypriot/rpi-nano-httpd --replicas=3--port=80
deployment"hello-kube"created
$kubectlexposedeploymenthello-kube--port=8300--target-port=80--type="LoadBalanc
service"hello-kube"exposed
$kubectlgetsvc
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
hello-kube 10.0.0.124 ,192.168.1.102 8300/TCP 8s
kubernetes 10.0.0.1 <none> 443/TCP 7h
$kubectldeleteservice,deploymenthello-kube
31 / 40
Test #4
kubectl run + kubectl expose
32 / 40
33 / 40
34 / 40
35 / 40
36 / 40
37 / 40
Refs
38 / 40
Refs
1. Tim Hockin, Kubernetes: One Year Later
2. Ray Tsang @saturnism, Kubernetes with Java-based Microservices
3. Stefan Schimanski, Kubernetes Architecture & Introduction
4. @luxas - kubernetes-on-arm
5. Daniel Smith, What's new in Kubernetes
6. Kubernetes - What is Kubernetes?
7. Kubernetes - User Guide
8. Learn the Kubernetes Key Concepts
9. Kubernetes Intro and Update @thockin
10. kubernetes/architecture.md at release-1.2 - kubernetes/kubernetes
11. Kubernetes - User Guide
12. An Introduction to Kubernetes
39 / 40
END
Eueung Mulyana
http://eueung.github.io/docker-stuff/kubernetes
CodeLabs | Attribution-ShareAlike CC BY-SA
40 / 40

Contenu connexe

Tendances

Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopBob Killen
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes IntroductionPeng Xiao
 
Kubernetes - introduction
Kubernetes - introductionKubernetes - introduction
Kubernetes - introductionSparkbit
 
Kubernetes a comprehensive overview
Kubernetes   a comprehensive overviewKubernetes   a comprehensive overview
Kubernetes a comprehensive overviewGabriel Carro
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetesRishabh Indoria
 
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesKubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesSlideTeam
 
Deploy Application on Kubernetes
Deploy Application on KubernetesDeploy Application on Kubernetes
Deploy Application on KubernetesOpsta
 
Kubernetes
KubernetesKubernetes
Kuberneteserialc_w
 
An overview of the Kubernetes architecture
An overview of the Kubernetes architectureAn overview of the Kubernetes architecture
An overview of the Kubernetes architectureIgor Sfiligoi
 
Getting Started with Kubernetes
Getting Started with Kubernetes Getting Started with Kubernetes
Getting Started with Kubernetes VMware Tanzu
 
Rancher 2.0 Technical Deep Dive
Rancher 2.0 Technical Deep DiveRancher 2.0 Technical Deep Dive
Rancher 2.0 Technical Deep DiveLINE Corporation
 
Kubernetes Architecture and Introduction
Kubernetes Architecture and IntroductionKubernetes Architecture and Introduction
Kubernetes Architecture and IntroductionStefan Schimanski
 
Monitoring, Logging and Tracing on Kubernetes
Monitoring, Logging and Tracing on KubernetesMonitoring, Logging and Tracing on Kubernetes
Monitoring, Logging and Tracing on KubernetesMartin Etmajer
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes NetworkingCJ Cullen
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshoploodse
 

Tendances (20)

Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Kubernetes - introduction
Kubernetes - introductionKubernetes - introduction
Kubernetes - introduction
 
Kubernetes a comprehensive overview
Kubernetes   a comprehensive overviewKubernetes   a comprehensive overview
Kubernetes a comprehensive overview
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesKubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
 
Deploy Application on Kubernetes
Deploy Application on KubernetesDeploy Application on Kubernetes
Deploy Application on Kubernetes
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
 
An overview of the Kubernetes architecture
An overview of the Kubernetes architectureAn overview of the Kubernetes architecture
An overview of the Kubernetes architecture
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Getting Started with Kubernetes
Getting Started with Kubernetes Getting Started with Kubernetes
Getting Started with Kubernetes
 
Rancher 2.0 Technical Deep Dive
Rancher 2.0 Technical Deep DiveRancher 2.0 Technical Deep Dive
Rancher 2.0 Technical Deep Dive
 
Kubernetes Architecture and Introduction
Kubernetes Architecture and IntroductionKubernetes Architecture and Introduction
Kubernetes Architecture and Introduction
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Monitoring, Logging and Tracing on Kubernetes
Monitoring, Logging and Tracing on KubernetesMonitoring, Logging and Tracing on Kubernetes
Monitoring, Logging and Tracing on Kubernetes
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshop
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 

En vedette

Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with KubernetesCarlos Sanchez
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to KubernetesRoss Kukulinski
 
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 MeetupStefan Schimanski
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetesrajdeep
 
Kubernetes architecture
Kubernetes architectureKubernetes architecture
Kubernetes architectureJanakiram MSV
 

En vedette (6)

Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with Kubernetes
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
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
 
kubernetes for beginners
kubernetes for beginnerskubernetes for beginners
kubernetes for beginners
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Kubernetes architecture
Kubernetes architectureKubernetes architecture
Kubernetes architecture
 

Similaire à Kubernetes Basics

A brief study on Kubernetes and its components
A brief study on Kubernetes and its componentsA brief study on Kubernetes and its components
A brief study on Kubernetes and its componentsRamit Surana
 
Kubernetes for Java developers
Kubernetes for Java developersKubernetes for Java developers
Kubernetes for Java developersRobert Barr
 
Kubernetes 101 for Beginners
Kubernetes 101 for BeginnersKubernetes 101 for Beginners
Kubernetes 101 for BeginnersOktay Esgul
 
Dev opsec dockerimage_patch_n_lifecyclemanagement_
Dev opsec dockerimage_patch_n_lifecyclemanagement_Dev opsec dockerimage_patch_n_lifecyclemanagement_
Dev opsec dockerimage_patch_n_lifecyclemanagement_kanedafromparis
 
Getting started with google kubernetes engine
Getting started with google kubernetes engineGetting started with google kubernetes engine
Getting started with google kubernetes engineShreya Pohekar
 
Kubernetes From Scratch .pdf
Kubernetes From Scratch .pdfKubernetes From Scratch .pdf
Kubernetes From Scratch .pdfssuser9b44c7
 
Kubernetes Architecture with Components
 Kubernetes Architecture with Components Kubernetes Architecture with Components
Kubernetes Architecture with ComponentsAjeet Singh
 
Containers and Kubernetes -Notes Leo
Containers and Kubernetes -Notes LeoContainers and Kubernetes -Notes Leo
Containers and Kubernetes -Notes LeoLéopold Gault
 
Kubernetes extensibility
Kubernetes extensibilityKubernetes extensibility
Kubernetes extensibilityDocker, Inc.
 
DevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesDevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesRonny Trommer
 
Kubernetes fundamentals
Kubernetes fundamentalsKubernetes fundamentals
Kubernetes fundamentalsVictor Morales
 
Dessi docker kubernetes paas cloud
Dessi docker kubernetes paas cloudDessi docker kubernetes paas cloud
Dessi docker kubernetes paas cloudMassimiliano Dessì
 
Come costruire una Platform As A Service con Docker, Kubernetes Go e Java
Come costruire una Platform As A Service con Docker, Kubernetes Go e JavaCome costruire una Platform As A Service con Docker, Kubernetes Go e Java
Come costruire una Platform As A Service con Docker, Kubernetes Go e JavaCodemotion
 
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMwareVMUG IT
 
Container & kubernetes
Container & kubernetesContainer & kubernetes
Container & kubernetesTed Jung
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Anthony Dahanne
 

Similaire à Kubernetes Basics (20)

A brief study on Kubernetes and its components
A brief study on Kubernetes and its componentsA brief study on Kubernetes and its components
A brief study on Kubernetes and its components
 
Kubernetes for Java developers
Kubernetes for Java developersKubernetes for Java developers
Kubernetes for Java developers
 
Kubernetes 101 for Beginners
Kubernetes 101 for BeginnersKubernetes 101 for Beginners
Kubernetes 101 for Beginners
 
Dev opsec dockerimage_patch_n_lifecyclemanagement_
Dev opsec dockerimage_patch_n_lifecyclemanagement_Dev opsec dockerimage_patch_n_lifecyclemanagement_
Dev opsec dockerimage_patch_n_lifecyclemanagement_
 
Getting started with google kubernetes engine
Getting started with google kubernetes engineGetting started with google kubernetes engine
Getting started with google kubernetes engine
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
The State of Linux Containers
The State of Linux ContainersThe State of Linux Containers
The State of Linux Containers
 
Kubernetes From Scratch .pdf
Kubernetes From Scratch .pdfKubernetes From Scratch .pdf
Kubernetes From Scratch .pdf
 
Kubernetes Architecture with Components
 Kubernetes Architecture with Components Kubernetes Architecture with Components
Kubernetes Architecture with Components
 
Container Orchestration using kubernetes
Container Orchestration using kubernetesContainer Orchestration using kubernetes
Container Orchestration using kubernetes
 
Containers and Kubernetes -Notes Leo
Containers and Kubernetes -Notes LeoContainers and Kubernetes -Notes Leo
Containers and Kubernetes -Notes Leo
 
Kubernetes extensibility
Kubernetes extensibilityKubernetes extensibility
Kubernetes extensibility
 
DevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesDevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to Kubernetes
 
Kubernetes fundamentals
Kubernetes fundamentalsKubernetes fundamentals
Kubernetes fundamentals
 
Dessi docker kubernetes paas cloud
Dessi docker kubernetes paas cloudDessi docker kubernetes paas cloud
Dessi docker kubernetes paas cloud
 
Come costruire una Platform As A Service con Docker, Kubernetes Go e Java
Come costruire una Platform As A Service con Docker, Kubernetes Go e JavaCome costruire una Platform As A Service con Docker, Kubernetes Go e Java
Come costruire una Platform As A Service con Docker, Kubernetes Go e Java
 
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
 
Container & kubernetes
Container & kubernetesContainer & kubernetes
Container & kubernetes
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !
 
Intro to Kubernetes
Intro to KubernetesIntro to Kubernetes
Intro to Kubernetes
 

Plus de Eueung Mulyana

Hyper-Connectivity and Data Proliferation - Ecosystem Perspective
Hyper-Connectivity and Data Proliferation - Ecosystem PerspectiveHyper-Connectivity and Data Proliferation - Ecosystem Perspective
Hyper-Connectivity and Data Proliferation - Ecosystem PerspectiveEueung Mulyana
 
Industry 4.0 And Beyond The A.I* For Surviving A Tech-Accelerated World
Industry 4.0 And Beyond The A.I* For Surviving A Tech-Accelerated WorldIndustry 4.0 And Beyond The A.I* For Surviving A Tech-Accelerated World
Industry 4.0 And Beyond The A.I* For Surviving A Tech-Accelerated WorldEueung Mulyana
 
Blockchain Introduction
Blockchain IntroductionBlockchain Introduction
Blockchain IntroductionEueung Mulyana
 
Bringing Automation to the Classroom: A ChatOps-Based Approach
Bringing Automation to the Classroom: A ChatOps-Based ApproachBringing Automation to the Classroom: A ChatOps-Based Approach
Bringing Automation to the Classroom: A ChatOps-Based ApproachEueung Mulyana
 
FinTech & Cryptocurrency Introduction
FinTech & Cryptocurrency IntroductionFinTech & Cryptocurrency Introduction
FinTech & Cryptocurrency IntroductionEueung Mulyana
 
Open Source Networking Overview
Open Source Networking OverviewOpen Source Networking Overview
Open Source Networking OverviewEueung Mulyana
 
ONOS SDN Controller - Clustering Tests & Experiments
ONOS SDN Controller - Clustering Tests & Experiments ONOS SDN Controller - Clustering Tests & Experiments
ONOS SDN Controller - Clustering Tests & Experiments Eueung Mulyana
 
Open stack pike-devstack-tutorial
Open stack pike-devstack-tutorialOpen stack pike-devstack-tutorial
Open stack pike-devstack-tutorialEueung Mulyana
 
ONOS SDN Controller - Introduction
ONOS SDN Controller - IntroductionONOS SDN Controller - Introduction
ONOS SDN Controller - IntroductionEueung Mulyana
 
OpenDaylight SDN Controller - Introduction
OpenDaylight SDN Controller - IntroductionOpenDaylight SDN Controller - Introduction
OpenDaylight SDN Controller - IntroductionEueung Mulyana
 
Android Programming Basics
Android Programming BasicsAndroid Programming Basics
Android Programming BasicsEueung Mulyana
 
Cloud Computing: Overview and Examples
Cloud Computing: Overview and ExamplesCloud Computing: Overview and Examples
Cloud Computing: Overview and ExamplesEueung Mulyana
 
selected input/output - sensors and actuators
selected input/output - sensors and actuatorsselected input/output - sensors and actuators
selected input/output - sensors and actuatorsEueung Mulyana
 
Connected Things, IoT and 5G
Connected Things, IoT and 5GConnected Things, IoT and 5G
Connected Things, IoT and 5GEueung Mulyana
 
Connectivity for Local Sensors and Actuators Using nRF24L01+
Connectivity for Local Sensors and Actuators Using nRF24L01+Connectivity for Local Sensors and Actuators Using nRF24L01+
Connectivity for Local Sensors and Actuators Using nRF24L01+Eueung Mulyana
 
NodeMCU with Blynk and Firebase
NodeMCU with Blynk and FirebaseNodeMCU with Blynk and Firebase
NodeMCU with Blynk and FirebaseEueung Mulyana
 
Trends and Enablers - Connected Services and Cloud Computing
Trends and Enablers  - Connected Services and Cloud ComputingTrends and Enablers  - Connected Services and Cloud Computing
Trends and Enablers - Connected Services and Cloud ComputingEueung Mulyana
 

Plus de Eueung Mulyana (20)

FGD Big Data
FGD Big DataFGD Big Data
FGD Big Data
 
Hyper-Connectivity and Data Proliferation - Ecosystem Perspective
Hyper-Connectivity and Data Proliferation - Ecosystem PerspectiveHyper-Connectivity and Data Proliferation - Ecosystem Perspective
Hyper-Connectivity and Data Proliferation - Ecosystem Perspective
 
Industry 4.0 And Beyond The A.I* For Surviving A Tech-Accelerated World
Industry 4.0 And Beyond The A.I* For Surviving A Tech-Accelerated WorldIndustry 4.0 And Beyond The A.I* For Surviving A Tech-Accelerated World
Industry 4.0 And Beyond The A.I* For Surviving A Tech-Accelerated World
 
Blockchain Introduction
Blockchain IntroductionBlockchain Introduction
Blockchain Introduction
 
Bringing Automation to the Classroom: A ChatOps-Based Approach
Bringing Automation to the Classroom: A ChatOps-Based ApproachBringing Automation to the Classroom: A ChatOps-Based Approach
Bringing Automation to the Classroom: A ChatOps-Based Approach
 
FinTech & Cryptocurrency Introduction
FinTech & Cryptocurrency IntroductionFinTech & Cryptocurrency Introduction
FinTech & Cryptocurrency Introduction
 
Open Source Networking Overview
Open Source Networking OverviewOpen Source Networking Overview
Open Source Networking Overview
 
ONOS SDN Controller - Clustering Tests & Experiments
ONOS SDN Controller - Clustering Tests & Experiments ONOS SDN Controller - Clustering Tests & Experiments
ONOS SDN Controller - Clustering Tests & Experiments
 
Open stack pike-devstack-tutorial
Open stack pike-devstack-tutorialOpen stack pike-devstack-tutorial
Open stack pike-devstack-tutorial
 
Basic onos-tutorial
Basic onos-tutorialBasic onos-tutorial
Basic onos-tutorial
 
ONOS SDN Controller - Introduction
ONOS SDN Controller - IntroductionONOS SDN Controller - Introduction
ONOS SDN Controller - Introduction
 
OpenDaylight SDN Controller - Introduction
OpenDaylight SDN Controller - IntroductionOpenDaylight SDN Controller - Introduction
OpenDaylight SDN Controller - Introduction
 
Mininet Basics
Mininet BasicsMininet Basics
Mininet Basics
 
Android Programming Basics
Android Programming BasicsAndroid Programming Basics
Android Programming Basics
 
Cloud Computing: Overview and Examples
Cloud Computing: Overview and ExamplesCloud Computing: Overview and Examples
Cloud Computing: Overview and Examples
 
selected input/output - sensors and actuators
selected input/output - sensors and actuatorsselected input/output - sensors and actuators
selected input/output - sensors and actuators
 
Connected Things, IoT and 5G
Connected Things, IoT and 5GConnected Things, IoT and 5G
Connected Things, IoT and 5G
 
Connectivity for Local Sensors and Actuators Using nRF24L01+
Connectivity for Local Sensors and Actuators Using nRF24L01+Connectivity for Local Sensors and Actuators Using nRF24L01+
Connectivity for Local Sensors and Actuators Using nRF24L01+
 
NodeMCU with Blynk and Firebase
NodeMCU with Blynk and FirebaseNodeMCU with Blynk and Firebase
NodeMCU with Blynk and Firebase
 
Trends and Enablers - Connected Services and Cloud Computing
Trends and Enablers  - Connected Services and Cloud ComputingTrends and Enablers  - Connected Services and Cloud Computing
Trends and Enablers - Connected Services and Cloud Computing
 

Dernier

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Dernier (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

Kubernetes Basics

  • 1. Orchestrating Containers Kubernetes Basics Eueung Mulyana http://eueung.github.io/docker-stuff/kubernetes CodeLabs | Attribution-ShareAlike CC BY-SA 1 / 40
  • 2. Outline Kubernetes - Short Introduction Parts & Components Getting Started kubectl run + kubectl expose 2 / 40
  • 4. Kubernetes is an open-source platform for automating deployment, scaling, and operations of application containers across clusters of hosts, providing container-centric infrastructure. With Kubernetes, you are able to quickly and e ciently respond to customer demand: Deploy your applications quickly and predictably. Scale your applications on the y. Seamlessly roll out new features. Optimize use of your hardware by using only the resources you need Kubernetes is: portable: public, private, hybrid, multi-cloud extensible: modular, pluggable, hookable, composable self-healing: auto-placement, auto-restart, auto- replication, auto-scaling Ref: kubernetes.io 4 / 40 What is Kubernetes? The name Kubernetes originates from Greek, meaning "helmsman" or "pilot", and is the root of "governor" and "cybernetic". K8s is an abbreviation derived by replacing the 8 letters "ubernete" with 8. With Kubernetes you can deploy a full cluster of multi-tiered containers (frontend, backend, etc.) with a single con guration le and a single command (Ref).
  • 5. Kubernetes Container orchestrator Runs and manages containers Supports multiple cloud and bare-metal environments Inspired and informed by Google's experiences and internal systems 100% Open source, written in Go Manage applications, not machines Ref: Kubernetes Intro and Update @thockin 5 / 40
  • 6. 6 / 40 Architecture A running Kubernetes cluster contains node agents (kubelet) and master components (apiserver, scheduler, etc), on top of a distributed storage solution.
  • 7. 7 / 40 K8s Node Worker / Minion The Kubernetes node has the services necessary to run application containers and be managed from the master systems. Each node runs container engine e.g. Docker. This engine takes care of the details of downloading images and running containers. kubelet kube-proxy
  • 8. 8 / 40 K8s Node kubelet The kubelet manages pods and their containers, their images, their volumes, etc. kube-proxy Each node also runs a simple network proxy and load balancer. This re ects services as de ned in the Kubernetes API (apiserver) on each node and can do simple TCP and UDP stream forwarding (round robin) across a set of backends.
  • 9. 9 / 40 K8s Master Control Plane The Kubernetes control plane is split into a set of components. Currently they all run on a single master node. These components work together to provide a uni ed view of the cluster. etcd All persistent master state is stored in an instance of etcd. This provides a great way to store con guration data reliably. With watch support, coordinating components can be noti ed very quickly of changes.
  • 10. 10 / 40 K8s Master etcd API Server The apiserver serves up the Kubernetes API. It is intended to be a CRUD-y server, with most/all business logic implemented in separate components or in plug-ins. It mainly processes REST operations, validates them, and updates the corresponding objects in etcd (and eventually other stores).
  • 11. 11 / 40 Scheduler The scheduler binds unscheduled pods to nodes via the /binding API. The scheduler is pluggable, support for multiple cluster schedulers and user-provided schedulers in the plan. Controller Manager All other cluster-level functions are currently performed by the Controller Manager. For instance, Endpoints objects are created and updated by the endpoints controller, and nodes are discovered, managed, and monitored by the node controller. These could eventually be split into separate components to make them independently pluggable. The replicationcontroller is a mechanism that is layered on top of the simple pod API.
  • 14. 14 / 40 Containers Pods A pod is a co-located group of containers ...
  • 15. 15 / 40 Containers Pods Pods with Volumes A pod is a co-located group of containers and volumes. A volume is a directory, possibly with some data in it, which is accessible to a Container as part of its lesystem. Kubernetes volumes build upon Docker Volumes, adding provisioning of the volume directory and/or device.
  • 16. 16 / 40 Containers Pods Pods with Volumes Labels A label is a key/value pair that is attached to a resource, such as a pod, to convey a user-de ned identifying attribute. Labels can be used to organize and to select subsets of resources.
  • 17. 17 / 40 Containers Pods Pods with Volumes Labels Replication Controllers A replication controller ensures that a speci ed number of pod replicas are running at any one time. It both allows for easy scaling of replicated systems and handles re- creation of a pod when the machine it is on reboots or otherwise fails.
  • 18. 18 / 40 Containers Pods Pods with Volumes Labels Replication Controllers Creating labeled pods with a (labeled) RC
  • 19. 19 / 40 Containers Pods Pods with Volumes Labels Replication Controllers Services Services & labeled Services A service de nes a set of pods and a means by which to access them, such as single stable IP address and corresponding DNS name.
  • 20. 20 / 40 Containers Pods Pods with Volumes Labels Replication Controllers Services
  • 22. 22 / 40 node1 RPI 3 192.168.1.102 node2 RPI 2 192.168.1.101 node3 RPI 2 192.168.1.100
  • 23. 23 / 40 kubernetes-on-arm v0.7.0 by @luxas $dpkg-ikube-systemd.deb $kube-configinstall #rpiorrpi-2,hypriotos $gzip-dcimages.tar.gz|dockerload $kube-configinfo Architecture:armv7l Kernel:Linux4.1.17 CPU:4coresx1200MHz UsedRAMMemory:111MiB-RAMMemory:925MiB Useddiskspace:2.4GB(2424044KB) Freediskspace:11GB(11382472KB) SDCard/debpackagewasbuilt:21-03-201621:06 kubernetes-on-arm: Latestcommit:1d0bbe1-Version:0.7.0 systemdversion:v215 dockerversion:v1.10.3 kubernetesclientversion:v1.2.0
  • 24. 24 / 40 $dockerimages REPOSITORY TAG IMAGEID CREATED kubernetesonarm/etcd 0.7.0 3550c0c4f205 8weeksago kubernetesonarm/etcd latest 3550c0c4f205 8weeksago kubernetesonarm/grafana 0.7.0 8ea26f4ef5a3 8weeksago kubernetesonarm/grafana latest 8ea26f4ef5a3 8weeksago kubernetesonarm/influxdb 0.7.0 447951a687c6 8weeksago kubernetesonarm/influxdb latest 447951a687c6 8weeksago kubernetesonarm/heapster 0.7.0 1d034674fc0e 8weeksago kubernetesonarm/heapster latest 1d034674fc0e 8weeksago kubernetesonarm/loadbalancer 0.7.0 6b262f2fd318 8weeksago kubernetesonarm/loadbalancer latest 6b262f2fd318 8weeksago kubernetesonarm/registry 0.7.0 4c9c964f89e9 8weeksago kubernetesonarm/registry latest 4c9c964f89e9 8weeksago kubernetesonarm/exechealthz 0.7.0 57f77542ac5c 8weeksago kubernetesonarm/exechealthz latest 57f77542ac5c 8weeksago kubernetesonarm/kube2sky 0.7.0 770cccac4236 8weeksago kubernetesonarm/kube2sky latest 770cccac4236 8weeksago kubernetesonarm/skydns 0.7.0 30ea4958f939 8weeksago kubernetesonarm/skydns latest 30ea4958f939 8weeksago kubernetesonarm/pause 0.7.0 05edc969256e 8weeksago kubernetesonarm/pause latest 05edc969256e 8weeksago kubernetesonarm/hyperkube 0.7.0 380def049467 8weeksago kubernetesonarm/hyperkube latest 380def049467 8weeksago kubernetesonarm/flannel 0.7.0 8a35c629399f 8weeksago kubernetesonarm/flannel latest 8a35c629399f 8weeksago hypriot/rpi-swarm latest c298de062190 10weeksago
  • 25. $kube-configenable-master Disablingk8sifitisrunning Checkssoallimagesarepresent Transferringimagestosystem-docker,ifnecessary Copyingkubernetesonarm/etcdtosystem-docker ... Kubernetesmasterservicesenabled $dockerps CONTAINERID IMAGE COMMAND CREATED 7bf736d84451 kubernetesonarm/hyperkube "/hyperkubecontrolle" 2minutesago 5560f06bcf47 kubernetesonarm/hyperkube "/hyperkubeproxy--m" 2minutesago 0fb169567946 kubernetesonarm/hyperkube "/hyperkubescheduler" 2minutesago 11c03a40412c kubernetesonarm/hyperkube "/hyperkubeapiserver" 2minutesago ede858b35dfa kubernetesonarm/pause "/pause" 2minutesago 5e38dac4fd19 kubernetesonarm/hyperkube "/hyperkubekubelet-" 3minutesago 25 / 40 Master
  • 27. $kubectlgetnodes NAME STATUS AGE 192.168.1.100 Ready 26s 192.168.1.101 Ready 7m 192.168.1.102 Ready 4h $kubectlcluster-info Kubernetesmasterisrunningathttp://localhost:8080 27 / 40 Check
  • 28. $kubectlrunmy-nginx--image=luxas/nginx-test --replicas=3--expose--port=80 service"my-nginx"created deployment"my-nginx"created $kubectlgetpods NAME READY STATUS RESTARTS AGE k8s-master-192.168.1.102 4/4 Running 1 5h my-nginx-3795026575-9w8mw 0/1 ContainerCreating 0 14s my-nginx-3795026575-miz3d 0/1 ContainerCreating 0 14s my-nginx-3795026575-zy2d4 0/1 ContainerCreating 0 14s $kubectlgetsvc NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes 10.0.0.1 <none> 443/TCP 5h my-nginx 10.0.0.129 <none> 80/TCP 36s $kubectlgetdeployments NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE my-nginx 3 3 3 1 1m $curl10.0.0.129 <p>WELCOMETONGINX</p> 28 / 40 Test #1
  • 29. $kubectlrunhello-kube--image=hypriot/rpi-nano-httpd --port=80 deployment"hello-kube"created $kubectlexposedeploymenthello-kube--type="LoadBalancer"--external-ip="192.168.1. service"hello-kube"exposed $kubectlgetpods-owide NAME READY STATUS RESTARTS AGE NODE hello-kube-1079346743-2knj3 0/1 ImagePullBackOff 0 55s 192.16 k8s-master-192.168.1.102 4/4 Running 1 8h 192.16 $kubectlgetdeployments NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE hello-kube 1 1 1 1 1m $kubectlgetpods-owide NAME READY STATUS RESTARTS AGE NODE hello-kube-1079346743-2knj3 1/1 Running 0 1m 192.168.1.100 k8s-master-192.168.1.102 4/4 Running 1 8h 192.168.1.102 $kubectlgetsvc NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE hello-kube 10.0.0.197 ,192.168.1.102 80/TCP 44s kubernetes 10.0.0.1 <none> 443/TCP 8h $curl10.0.0.197 <html><head><title>PiarmedwithDockerbyHypriot</title> <bodystyle="width:100%;background-color:black;"> <divid="main"style="margin:100pxauto0auto;width:800px;"> <imgsrc="pi_armed_with_docker.jpg"alt="piarmedwithdocker"style="width:800 </div> </body></html> 29 / 40 Test #2
  • 30. $kubectlrunhello-kube--image=hypriot/rpi-nano-httpd --replicas=2--port=80 deployment"hello-kube"created $kubectlexposedeploymenthello-kube--type="LoadBalancer"--external-ip="192.168.1. service"hello-kube"exposed $kubectlgetsvc NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE hello-kube 10.0.0.221 ,192.168.1.102 80/TCP 10s kubernetes 10.0.0.1 <none> 443/TCP 8h $kubectlgetpods-owide NAME READY STATUS RESTARTS AGE NODE hello-kube-1079346743-44yig 1/1 Running 0 1m 192.168.1.100 hello-kube-1079346743-upzxy 1/1 Running 0 1m 192.168.1.101 k8s-master-192.168.1.102 4/4 Running 1 8h 192.168.1.102 $curl10.0.0.221 $curl192.168.1.102 <html><head><title>PiarmedwithDockerbyHypriot</title> <bodystyle="width:100%;background-color:black;"> <divid="main"style="margin:100pxauto0auto;width:800px;"> <imgsrc="pi_armed_with_docker.jpg"alt="piarmedwithdocker"style="width:800 </div> </body></html> 30 / 40 Test #3
  • 31. $kubectlrunhello-kube--image=hypriot/rpi-nano-httpd --replicas=3--port=80 deployment"hello-kube"created $kubectlexposedeploymenthello-kube--port=8300--target-port=80--type="LoadBalanc service"hello-kube"exposed $kubectlgetsvc NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE hello-kube 10.0.0.124 ,192.168.1.102 8300/TCP 8s kubernetes 10.0.0.1 <none> 443/TCP 7h $kubectldeleteservice,deploymenthello-kube 31 / 40 Test #4
  • 32. kubectl run + kubectl expose 32 / 40
  • 39. Refs 1. Tim Hockin, Kubernetes: One Year Later 2. Ray Tsang @saturnism, Kubernetes with Java-based Microservices 3. Stefan Schimanski, Kubernetes Architecture & Introduction 4. @luxas - kubernetes-on-arm 5. Daniel Smith, What's new in Kubernetes 6. Kubernetes - What is Kubernetes? 7. Kubernetes - User Guide 8. Learn the Kubernetes Key Concepts 9. Kubernetes Intro and Update @thockin 10. kubernetes/architecture.md at release-1.2 - kubernetes/kubernetes 11. Kubernetes - User Guide 12. An Introduction to Kubernetes 39 / 40