SlideShare a Scribd company logo
www.aspex.be
Kubernetes
Container Orchestration for Prod-Grade People
www.aspex.be 2@Thomas_VanLaere
user$ whoami
thomasvanlaere
— Dev turned Azure consulting
www.aspex.be
“Treat your datacenter as one massive warehouse-scale computer”
www.aspex.be
Why K8S?
4
— Kubernetes is a framework for building distributed platform
— No hand holding
www.aspex.be
What K8s?
5
Load Balancers, Routers, DNS, etc..
Kubernetes
Infrastructure
Storage
(Block, NFS, etc..)
Machine
(VM, Phys, etc..)
Network
(L2, L3, VPN)
www.aspex.be
www.aspex.be
Contracts and boxes
7
apiVersion: v1
kind: pod
metadata:
name: nginx
labels:
app: nginx
spec:
containers:
image: nginx:1.10.0
Pick a box
Apply formalities
www.aspex.be
How Dockerfile?
8
FROM alpine:3.7
LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>"
ENV NGINX_VERSION 1.10.0
RUN addgroup -S nginx 
&& adduser -D -S -h /var/cache/nginx -s /sbin/nologin -G nginx nginx 
&& apk add --no-cache --virtual .build-deps 
gcc 
&& ln -sf /dev/stdout /var/log/nginx/access.log 
&& ln -sf /dev/stderr /var/log/nginx/error.log
COPY nginx.conf /etc/nginx/nginx.conf
COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
Pick a box
Apply formalities
www.aspex.be
Ah, contracts.
9
apiVersion: v1
kind: pod
metadata:
name: nginx
labels:
app: nginx
spec:
containers:
image: nginx:1.10.0
www.aspex.be
Deploy, go.
apiVersion: v1
kind: pod
metadata:
name: nginx
labels:
app: nginx
spec:
containers:
image: nginx:1.10.0
kube-apiserver
Node X
Kubelet
Container
Runtime
Kube-proxy
www.aspex.be
Deploy, go.
11
apiVersion: v1
kind: pod
metadata:
name: nginx
labels:
app: nginx
spec:
containers:
image: nginx:1.10.0
kube-apiserver
Node X
Kubelet
Container
Runtime
Kube-proxy
Kube-scheduler
www.aspex.be
Automated Deployments
12
www.aspex.be
Kubernetes: bin packing
13
www.aspex.be
Kubernetes: existing infrastructure
14
www.aspex.be
What Resources?
15
— Pod
— Group of tightly coupled containers and volumes
— Volumes
— Pod level storage and configs
— Replica Set
— A loop that drives current state towards a desired state
— Deployments
— Like Replica Sets but with deployment strategy capabilities
— Service
— A set of running pods that work together
www.aspex.be
What Container?
16
— Isolated executable environment
— Just another box
Container
App
Bin/lib
www.aspex.be
What Registry?
17
Build
Registry
C
C
C
C
C
C
— Distributed via Image Registries
— K8s supports public and private
— Containers are created with images
www.aspex.be
What Pods?
18
— Smallest possible unit
— Disposable entities
— Unique IP
— One or multiple containers
— Shares network namespace
— Localhost
— One or multiple volumes
Pod
Container X
Container Y
IP
Volume
A
Volume
B
www.aspex.be
Why ReplicaSet?
19
— Drives current state towards desired state
— App: nginx
— Replicas: 1
Node0
Pod
Container
Node1 Node2
www.aspex.be
Why ReplicaSet?
20
— Drives current state towards desired state
— App: nginx
— Replicas: 3
Node0
Pod
Container
Node1
Pod
Container
Node2
Pod
Container
www.aspex.be
Why ReplicaSet?
21
— Drives current state towards desired state
— App: nginx
— Replicas: 3
Node0
Pod
Container
Node1
Pod
Container
Node2
www.aspex.be
Why ReplicaSet?
22
— Drives current state towards desired state
— App: nginx
— Replicas: 3
Node0
Pod
Container
Node1
Pod
Container
Node2
Pod
Container
www.aspex.be
Shh, secrets.
23
— Secrets
— Think app settings
— Configmaps
— Think config artifacts
K8s control plane
Secret etcdKube-apiserver
www.aspex.be
Oh, secrets.
24
— Example
— Mount my config as a file on disk
K8s control plane
etcd
Kube-
apiserver
Node0
kubelet pod
pod
Secret
/etc/nginx/conf.d
www.aspex.be
Services.
25
apiVersion: v1
kind: pod
metadata:
name: nginx
labels:
app: nginx
spec:
containers:
image: nginx:1.10.0
www.aspex.be
Why Services?
26
— A logical grouping of pods
— Stable virtual IP and port
— DNS
— Optional but highly recommended
— Updates on backend change
Pod
Container
Service
Pod
Container
Pod
Container
Labels:
app: nginx
Labels:
app: nginx
Labels:
app: nginx
Selector:
app: nginx
www.aspex.be
Kubernetes Storage Model: PV & PVC
27
Pools w/ Persistent Volumes
Az Ma
Disks
iSCSI
Administrator
Registers PVs in the pool
www.aspex.be
Kubernetes Storage Model: PV & PVC
28
Pools w/ Persistent Volumes
Az Ma
Disks
iSCSI
Administrator
Registers PVs in the pool
Developer
Claim
Claims a PV from the pool
www.aspex.be
Kubernetes Storage Model: PV & PVC
29
Pools w/ Persistent Volumes
Az Ma
Disks
iSCSI
Administrator
Registers PVs in the pool
Developer
pod
PV
ClaimReferences the claim in a pod Container
www.aspex.be
Kubernetes: Dynamic provisioning w/ Storage Classes!
30
Storage Classes
Administrator
Registers Storage Classes
FastSSDSlowHDD
www.aspex.be
Kubernetes: Dynamic provisioning w/ Storage Classes!
31
Storage Classes
Administrator
Registers Storage Classes
FastSSDSlowHDD
Developer
Claim
Claims a PV from the pool
www.aspex.be
Kubernetes: Dynamic provisioning w/ Storage Classes!
32
Storage Classes
Administrator
Registers Storage Classes
FastSSDSlowHDD
Developer
pod
PV
Claim
References the claim in a pod
Container
www.aspex.be
Kubernetes: Demo
33
API
Endpoint
(Python)
Redis
Worker
(.NET)
SQL Server
Frontend
(NodeJS)
www.aspex.be
Kubernetes: Demo
34
Node0
Pod
MS SQL Server
Node1
Pod
.NET Worker
Pod
Python Flask
Pod
NodeJS
Pod
DB setup Job
Pod
Redis Cache
NodeJS
Service
MS SQL Server
Service
Python Flask
Service
Button
Browser
SSMS
Redis
Service
Public IP
Public IP
Public IP
www.aspex.be
Don’t get hacked
35
— Ingress
— Contains the mapping between URL paths and Services.
— Ingress Controller
— Pod which runs the ingress controller and nginx
— Ingress Service
— The Ingress Controller needs a public IP Address.
www.aspex.be
Kubernetes: Demo without Ingress
36
Node0
Pod
MS SQL Server
Node1
Pod
.NET Worker
Pod
Python Flask
Pod
NodeJS
Pod
DB setup Job
Pod
Redis Cache
NodeJS
Service
MS SQL Server
Service
Python Flask
Service
Button
Browser
SSMS
Redis
Service
Public IP
Public IP
Public IP
www.aspex.be
Node1
Kubernetes: With Ingress
37
Node0
Pod
MS SQL Server
Pod
.NET Worker
Pod
Python Flask
Pod
NodeJS
Pod
DB setup Job
Pod
Redis Cache
NodeJS
Service
MS SQL
Server
Service
Python Flask
ServiceButton
Browser
SSMS
Ingress
- Path: /
- Service: frontend
- Path: /api
- Service: endpoint
Ingress
Controller
NGINX Ingress
Controller
NGINX
Redis
Service
Public IP
Ingress
Service
80/443
www.aspex.be
THANK YOU
QUESTIONS?

More Related Content

What's hot

What's hot (20)

Net core, mssql, container und kubernetes
Net core, mssql, container und kubernetesNet core, mssql, container und kubernetes
Net core, mssql, container und kubernetes
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
KubeCon EU 2016: Multi-Tenant Kubernetes
KubeCon EU 2016: Multi-Tenant KubernetesKubeCon EU 2016: Multi-Tenant Kubernetes
KubeCon EU 2016: Multi-Tenant Kubernetes
 
Kubernetes on aws
Kubernetes on awsKubernetes on aws
Kubernetes on aws
 
Kubernetes - Starting with 1.2
Kubernetes  - Starting with 1.2Kubernetes  - Starting with 1.2
Kubernetes - Starting with 1.2
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with Kubernetes
 
Kubernetes best practices
Kubernetes best practicesKubernetes best practices
Kubernetes best practices
 
Kubernetes on AWS
Kubernetes on AWSKubernetes on AWS
Kubernetes on AWS
 
Scaling Microservices with Kubernetes
Scaling Microservices with KubernetesScaling Microservices with Kubernetes
Scaling Microservices with Kubernetes
 
Docker for Fun and Profit
Docker for Fun and ProfitDocker for Fun and Profit
Docker for Fun and Profit
 
What's new in Kubernetes
What's new in KubernetesWhat's new in Kubernetes
What's new in Kubernetes
 
Kubernetes and Hybrid Deployments
Kubernetes and Hybrid DeploymentsKubernetes and Hybrid Deployments
Kubernetes and Hybrid Deployments
 
Kubernetes meetup 101
Kubernetes meetup 101Kubernetes meetup 101
Kubernetes meetup 101
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Kubernetes 101 Workshop
Kubernetes 101 WorkshopKubernetes 101 Workshop
Kubernetes 101 Workshop
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
DevOps in AWS with Kubernetes
DevOps in AWS with KubernetesDevOps in AWS with Kubernetes
DevOps in AWS with Kubernetes
 
Scaling jenkins with kubernetes
Scaling jenkins with kubernetesScaling jenkins with kubernetes
Scaling jenkins with kubernetes
 
Container Days Boston - Kubernetes in production
Container Days Boston - Kubernetes in productionContainer Days Boston - Kubernetes in production
Container Days Boston - Kubernetes in production
 

Similar to Kubernetes: Container Orchestration for Production-grade People

DevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes IntegrationDevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes Integration
Hank Preston
 
Kubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CDKubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CD
Stfalcon Meetups
 
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
QAware GmbH
 
2 Linux Container and Docker
2 Linux Container and Docker2 Linux Container and Docker
2 Linux Container and Docker
Fabio Fumarola
 

Similar to Kubernetes: Container Orchestration for Production-grade People (20)

Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Bitbucket Pipelines - Powered by Kubernetes
Bitbucket Pipelines - Powered by KubernetesBitbucket Pipelines - Powered by Kubernetes
Bitbucket Pipelines - Powered by Kubernetes
 
Metal-k8s presentation by Julien Girardin @ Paris Kubernetes Meetup
Metal-k8s presentation by Julien Girardin @ Paris Kubernetes MeetupMetal-k8s presentation by Julien Girardin @ Paris Kubernetes Meetup
Metal-k8s presentation by Julien Girardin @ Paris Kubernetes Meetup
 
DevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes IntegrationDevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes Integration
 
CN Asturias - Stateful application for kubernetes
CN Asturias -  Stateful application for kubernetes CN Asturias -  Stateful application for kubernetes
CN Asturias - Stateful application for kubernetes
 
Kubernetes on AWS
Kubernetes on AWSKubernetes on AWS
Kubernetes on AWS
 
Kubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CDKubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CD
 
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
 
Develop with linux containers and docker
Develop with linux containers and dockerDevelop with linux containers and docker
Develop with linux containers and docker
 
Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307
 
2 Linux Container and Docker
2 Linux Container and Docker2 Linux Container and Docker
2 Linux Container and Docker
 
Elastic Kubernetes Services (EKS)
Elastic Kubernetes Services (EKS)Elastic Kubernetes Services (EKS)
Elastic Kubernetes Services (EKS)
 
Kubernetes extensibility
Kubernetes extensibilityKubernetes extensibility
Kubernetes extensibility
 
Kubernetes and Amazon ECS
Kubernetes and Amazon ECSKubernetes and Amazon ECS
Kubernetes and Amazon ECS
 
Kubernetes-Presentation-Syed-Murtaza-Hassan
Kubernetes-Presentation-Syed-Murtaza-HassanKubernetes-Presentation-Syed-Murtaza-Hassan
Kubernetes-Presentation-Syed-Murtaza-Hassan
 
Docker clusters on AWS with Amazon ECS and Kubernetes
Docker clusters on AWS with Amazon ECS and KubernetesDocker clusters on AWS with Amazon ECS and Kubernetes
Docker clusters on AWS with Amazon ECS and Kubernetes
 
Scaling Jenkins with Docker and Kubernetes
Scaling Jenkins with Docker and KubernetesScaling Jenkins with Docker and Kubernetes
Scaling Jenkins with Docker and Kubernetes
 
Kubernetes #1 intro
Kubernetes #1   introKubernetes #1   intro
Kubernetes #1 intro
 

More from ASPEX_BE

More from ASPEX_BE (7)

Human Ingenuity Amplified by Intelligent Technology
Human Ingenuity Amplified by Intelligent TechnologyHuman Ingenuity Amplified by Intelligent Technology
Human Ingenuity Amplified by Intelligent Technology
 
Aspex Tech Partner Event 2018 - Keynote
Aspex Tech Partner Event 2018 - KeynoteAspex Tech Partner Event 2018 - Keynote
Aspex Tech Partner Event 2018 - Keynote
 
Azure Management Basics
Azure Management BasicsAzure Management Basics
Azure Management Basics
 
Modernizing Your Existing Applications
Modernizing Your Existing ApplicationsModernizing Your Existing Applications
Modernizing Your Existing Applications
 
Aspex tech partner event 12-12-17
Aspex tech partner event 12-12-17Aspex tech partner event 12-12-17
Aspex tech partner event 12-12-17
 
The Microsoft vision for Blockchain
The Microsoft vision for BlockchainThe Microsoft vision for Blockchain
The Microsoft vision for Blockchain
 
2014 02 20_iamcp_partner_networking_aspe_xl
2014 02 20_iamcp_partner_networking_aspe_xl2014 02 20_iamcp_partner_networking_aspe_xl
2014 02 20_iamcp_partner_networking_aspe_xl
 

Recently uploaded

一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
aagad
 
Article writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptxArticle writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptx
abhinandnam9997
 

Recently uploaded (12)

The Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case StudyThe Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case Study
 
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAE
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
The Best AI Powered Software - Intellivid AI Studio
The Best AI Powered Software - Intellivid AI StudioThe Best AI Powered Software - Intellivid AI Studio
The Best AI Powered Software - Intellivid AI Studio
 
Article writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptxArticle writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptx
 
Stay Ahead with 2024's Top Web Design Trends
Stay Ahead with 2024's Top Web Design TrendsStay Ahead with 2024's Top Web Design Trends
Stay Ahead with 2024's Top Web Design Trends
 
The AI Powered Organization-Intro to AI-LAN.pdf
The AI Powered Organization-Intro to AI-LAN.pdfThe AI Powered Organization-Intro to AI-LAN.pdf
The AI Powered Organization-Intro to AI-LAN.pdf
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 

Kubernetes: Container Orchestration for Production-grade People