SlideShare a Scribd company logo
Deep Dive into Kubernetes
Part 1
Imesh Gunaratne, WSO2
Agenda
● Kubernetes Architecture
● Container Orchestration:
○ Pods
○ Replica Sets
○ Deployments
● Internal Routing
○ Services
● External Routing
○ Ingresses & Ingress Controllers
Agenda Cont.
● Configuration Management
○ Config Maps
● Credentials Management
○ Secrets
● Persistent Volumes
● Rolling Out Updates
● Autoscaling
○ Horizontal Pod Autoscalers
Agenda Cont.
● Package Management
○ Helm
● Hello World Example
Kubernetes Architecture
Kubernetes Architecture
Node 1 Node 2 Node nMaster
API
Overlay Network
UI
CLI
Container Registry
API Server
Scheduler
Controller
etcd
Container Orchestration
Pods
● A pod is a group of containers that
share the file system, users, network
interfaces, etc
● By default a pod will include two
containers: one for the given docker
image and other for the network
interface
C1 C2 Cn
apiVersion: v1
kind: Pod
metadata:
name: myapp-pod
labels:
app: myapp
spec:
containers:
- name: myapp-container
image: busybox
command: ['sh', '-c', 'echo
Hello Kubernetes! && sleep 3600']
Replica Sets
● Replica Sets are used for
orchestrating pods
● They define the docker images,
resources, env. variables, ports,
etc required for creating pods
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: frontend
labels:
app: guestbook
spec:
replicas: 3
selector:
matchLabels:
tier: frontend
matchExpressions:
- {key: tier, operator: In}
template:
metadata:
labels:
...
spec:
containers:
- name: php-redis
image: foo:bar
ports:
- containerPort: 80
Replica Set
C1 C2
Deployments
● A deployment is used for
orchestrating pods via replica sets:
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
Replica Set
Deployment
C1 C2
Internal Routing
Services
kind: Service
apiVersion: v1
metadata:
name: my-service
spec:
selector:
app: MyApp
ports:
- protocol: TCP
port: 80
targetPort: 9376
Replica Set
Deployment
Service
● A service provides a layer 4 load
balancer for pods:
C1 C2
Pod to Pod Communication
Replica Set A
Deployment A
ServiceA
C1 C2
Deployment B
Replica Set B
C3 C4
ServiceB
External Routing
Ingresses
Replica Set
Deployment
Service
Ingress
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test-ingress
annotations:
nginx.ingress.kubernetes.io/rewri
te-target: /
spec:
rules:
- http:
paths:
- path: /testpath
backend:
serviceName: test
servicePort: 80
● An ingress is used for configuring a
load balancer for external routing
C1 C2
Ingresses
Replica Set
Deployment
Service
Ingress
Ingress
Controller
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test-ingress
annotations:
nginx.ingress.kubernetes.io/rewri
te-target: /
spec:
rules:
- http:
paths:
- path: /testpath
backend:
serviceName: test
servicePort: 80
● An ingress is used for configuring a
load balancer for external routing
C1 C2
Ingresses
Replica Set
Deployment
Service
Ingress
Ingress
Controller
LoadBalancer
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test-ingress
annotations:
nginx.ingress.kubernetes.io/rewri
te-target: /
spec:
rules:
- http:
paths:
- path: /testpath
backend:
serviceName: test
servicePort: 80
● An ingress is used for configuring a
load balancer for external routing
C1 C2
Configuration Management
ConfigMaps
Replica Set
Deployment
Service
Ingress
Ingress
Controller
LoadBalancer
Config MapsConfig Files
● Configuration files can be injected
into pods using ConfigMaps
● A ConfigMap can be created for
key/value pairs, files and folders
Config MapsConfig Maps
C1 C2
Credentials Management
Config Maps
Secrets
Replica Set
Deployment
Service
Ingress
Ingress
Controller
LoadBalancer
Config Files
● Sensitive data such as
credentials, encryption keys can
be securely injected using
secrets
Config MapsConfig MapsConfig MapsSecrets
Config Maps
Credentials
C1 C2
Persistent Volumes
Config Maps
Persistent Volumes
Replica Set
Deployment
Config Files
Config Maps
Credentials
C1 C2
Persistent Volume ClaimPersistent Volumes
Service
● PVC defines volume size, and
type: ReadOnly, ReadWrite,
ReadWriteMany
Persistent Volume Types
● GCEPersistentDisk
● AWSElasticBlockStore
● AzureFile
● AzureDisk
● FC (Fibre Channel)**
● FlexVolume
● Flocker
● NFS
● iSCSI
● RBD (Ceph Block Device)
● CephFS
● Cinder (OpenStack block storage)
● Glusterfs
● VsphereVolume
● Quobyte Volumes
● VMware Photon
● Portworx Volumes
● ScaleIO Volumes
● StorageOS
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#types-of-persistent-volumes
Rolling Out Updates
Deployment Process
Deployment V1 V1 Deploying...
Replica Set V1
Deployment V1 V1 Deploying...
Deployment Process
Replica Set V1
Deployment V1
P1 - V1 P2 - V1 Service
C1 C2
V1 Pods Starting...
Deployment Process
C1
Replica Set V1
Deployment V1
P1 - V1 P2 - V1 Service
C2
V1 Pods Activating...
Deployment Process
C1
Replica Set V1
Deployment V1
C2
P1 - V1 P2 - V1 Service
V1 Pods Healthy
Deployment Process
C1
Replica Set V1
Deployment V1
C2
P1 - V1 P2 - V1
Deployment V2
Service
Deploying V2...
Rolling Update Process
C1
Replica Set V1
Deployment V1
C2
P1 - V1 P2 - V1
Deployment V2
Replica Set V2
Service
Deploying V2...
Rolling Update Process
Replica Set V1
Deployment V1
C2
P1 - V1 P2 - V1
Deployment V2
Replica Set V2
P1 - V2Service
C3
V2 Pods Starting...
C4
P2 - V2
C1
Rolling Update Process
C1
Replica Set V1
Deployment V1
C2
P1 - V1 P2 - V1
Deployment V2
Replica Set V2
C3
P1 - V2Service
V2 Pods Activating...
P2 - V2
C4
Rolling Update Process
Replica Set V1
Deployment V1
P1 - V1 P2 - V1
Deployment V2
Replica Set V2
C3 C4
P1 - V2 P2 - V2
C1 C2
Service
V2 Pods Healthy
Rolling Update Process
Autoscaling
Horizontal Pod Autoscalers
Replica Set
Deployment
Service
● Enable autoscaling for pods based on CPU utilization
Horizontal Pod
Autoscaler
Resource Metrics API
C1 C2
Package Management
Helm
● Helm is the Kubernetes package manager.
● It uses Charts for defining, installing and upgrading
applications on Kubernetes.
● Runtime configurations can be templated and
parameterized.
● Existing Charts can be reused and added as dependencies to
new Charts.
● Helm is managed by CNCF.
https://docs.helm.sh
Helm Hello World
# templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
Name: hello-world
spec:
replicas: 1
template:
metadata:
labels:
app: hello-world
spec:
containers:
- name: hello-world
image:
gcr.io/google-samples/node-hello
:1.0
ports:
- containerPort: 8080
protocol: TCP
# chart.yaml
name: apps/v1
version:
# templates/service.yaml
kind: Service
apiVersion: v1
metadata:
name: hello-world
spec:
type: NodePort
selector:
app: hello-world
ports:
- protocol: TCP
port: 8080
targetPort: 8080
Hello World Demo
Questions & Feedback
References
References
● Kubernetes Documentation:
○ https://kubernetes.io/docs/
● An Introduction to Kubernetes:
○ https://www.slideshare.net/imesh/an-introduction-to-kubernetes
● WSO2Con US 2015 Kubernetes: a platform for automating deployment,
scaling, and operations:
○ https://www.slideshare.net/BrianGrant11/wso2con-us-2015-kube
rnetes-a-platform-for-automating-deployment-scaling-and-operati
ons
● Kubernetes: An Overview:
○ https://thenewstack.io/kubernetes-an-overview/
References Cont.
● Helm Documentation:
○ https://docs.helm.sh
● The missing CI/CD Kubernetes component: Helm package manager
○ https://medium.com/@gajus/the-missing-ci-cd-kubernetes-compon
ent-helm-package-manager-1fe002aac680
Thank You!

More Related Content

What's hot (20)

PDF
Kubernetes 101
Crevise Technologies
 
PDF
Kubernetes - A Comprehensive Overview
Bob Killen
 
PDF
Introduction to Kubernetes Workshop
Bob Killen
 
PDF
Getting Started with Kubernetes
VMware Tanzu
 
PDF
Kubernetes dealing with storage and persistence
Janakiram MSV
 
PDF
Kubernetes Architecture and Introduction
Stefan Schimanski
 
PPTX
DevOps with Kubernetes
EastBanc Tachnologies
 
PDF
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Edureka!
 
PPTX
Kubernetes Basics
Rishabh Kumar
 
PDF
Helm - Application deployment management for Kubernetes
Alexei Ledenev
 
PDF
How to write a Dockerfile
Knoldus Inc.
 
PDF
Kubernetes
Meng-Ze Lee
 
PDF
Architecture Overview: Kubernetes with Red Hat Enterprise Linux 7.1
Etsuji Nakai
 
PDF
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
Jo Hoon
 
PPTX
Kubernetes 101
Stanislav Pogrebnyak
 
PDF
Hands-On Introduction to Kubernetes at LISA17
Ryan Jarvinen
 
PPTX
Kubernetes Introduction
Eric Gustafson
 
PDF
Kubernetes
erialc_w
 
PDF
What Is Helm
AMELIAOLIVIA2
 
PPTX
Docker & Kubernetes 기초 - 최용호
용호 최
 
Kubernetes 101
Crevise Technologies
 
Kubernetes - A Comprehensive Overview
Bob Killen
 
Introduction to Kubernetes Workshop
Bob Killen
 
Getting Started with Kubernetes
VMware Tanzu
 
Kubernetes dealing with storage and persistence
Janakiram MSV
 
Kubernetes Architecture and Introduction
Stefan Schimanski
 
DevOps with Kubernetes
EastBanc Tachnologies
 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Edureka!
 
Kubernetes Basics
Rishabh Kumar
 
Helm - Application deployment management for Kubernetes
Alexei Ledenev
 
How to write a Dockerfile
Knoldus Inc.
 
Kubernetes
Meng-Ze Lee
 
Architecture Overview: Kubernetes with Red Hat Enterprise Linux 7.1
Etsuji Nakai
 
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
Jo Hoon
 
Kubernetes 101
Stanislav Pogrebnyak
 
Hands-On Introduction to Kubernetes at LISA17
Ryan Jarvinen
 
Kubernetes Introduction
Eric Gustafson
 
Kubernetes
erialc_w
 
What Is Helm
AMELIAOLIVIA2
 
Docker & Kubernetes 기초 - 최용호
용호 최
 

Similar to Deep Dive into Kubernetes - Part 1 (20)

PPTX
Introduction kubernetes 2017_12_24
Sam Zheng
 
PPTX
Kubernetes
Lhouceine OUHAMZA
 
PPTX
Introduction to Kubernetes
Paul Czarkowski
 
PDF
Kubernetes for the PHP developer
Paul Czarkowski
 
PDF
Kubernetes for Beginners
DigitalOcean
 
PDF
Kubernetes
Diego Pacheco
 
PPTX
Kube Overview and Kube Conformance Certification OpenSource101 Raleigh
Brad Topol
 
PDF
Scaling docker with kubernetes
Liran Cohen
 
PDF
Kubernetes Intro
Antonio Ojea Garcia
 
PDF
Intro to Kubernetes
Joonathan Mägi
 
PDF
Kubernetes - Starting with 1.2
William Stewart
 
PPTX
Kubernetes Internals
Shimi Bandiel
 
PPTX
Kubernetes 101
Huy Vo
 
PPTX
Kubernetes #1 intro
Terry Cho
 
PDF
A DevOps guide to Kubernetes
Paul Czarkowski
 
PPTX
An Introduction to Kubernetes and Continuous Delivery Fundamentals
All Things Open
 
PPT
Kubernetes for Cloud-Native Environments
AdiB912552
 
PPTX
kubernetesforbeginners.pptx
BaskarKannanK
 
PPTX
K8s in 3h - Kubernetes Fundamentals Training
Piotr Perzyna
 
PPTX
Kubernetes-Presentation-Syed-Murtaza-Hassan
Syed Murtaza Hassan
 
Introduction kubernetes 2017_12_24
Sam Zheng
 
Kubernetes
Lhouceine OUHAMZA
 
Introduction to Kubernetes
Paul Czarkowski
 
Kubernetes for the PHP developer
Paul Czarkowski
 
Kubernetes for Beginners
DigitalOcean
 
Kubernetes
Diego Pacheco
 
Kube Overview and Kube Conformance Certification OpenSource101 Raleigh
Brad Topol
 
Scaling docker with kubernetes
Liran Cohen
 
Kubernetes Intro
Antonio Ojea Garcia
 
Intro to Kubernetes
Joonathan Mägi
 
Kubernetes - Starting with 1.2
William Stewart
 
Kubernetes Internals
Shimi Bandiel
 
Kubernetes 101
Huy Vo
 
Kubernetes #1 intro
Terry Cho
 
A DevOps guide to Kubernetes
Paul Czarkowski
 
An Introduction to Kubernetes and Continuous Delivery Fundamentals
All Things Open
 
Kubernetes for Cloud-Native Environments
AdiB912552
 
kubernetesforbeginners.pptx
BaskarKannanK
 
K8s in 3h - Kubernetes Fundamentals Training
Piotr Perzyna
 
Kubernetes-Presentation-Syed-Murtaza-Hassan
Syed Murtaza Hassan
 
Ad

More from Imesh Gunaratne (20)

PDF
Planning WSO2 Deployments on Pivotal Cloud Foundry
Imesh Gunaratne
 
PDF
Planning WSO2 Deployments on DC/OS
Imesh Gunaratne
 
PDF
Deep Dive into Kubernetes - Part 2
Imesh Gunaratne
 
PDF
WSO2 Container Strategy
Imesh Gunaratne
 
PDF
WSO2 API Manager Reference Architecture for DC/OS
Imesh Gunaratne
 
PDF
WSO2 API Manager Reference Architecture for Pivotal Cloud Foundry
Imesh Gunaratne
 
PDF
WSO2 Kubernetes Reference Architecture - Nov 2017
Imesh Gunaratne
 
PDF
WSO2 Cloud and Platform as a Service Strategy
Imesh Gunaratne
 
PDF
Planning Your Cloud Strategy
Imesh Gunaratne
 
PDF
Deploying WSO2 Middleware on Containers
Imesh Gunaratne
 
PDF
Multitenancy in WSO2 Carbon 5 (C5)
Imesh Gunaratne
 
PDF
Deploying WSO2 Middleware on Mesos
Imesh Gunaratne
 
PDF
Deploying WSO2 Middleware on Kubernetes
Imesh Gunaratne
 
PDF
Service Oriented Architecture & Beyond
Imesh Gunaratne
 
PDF
Docker for Java Developers
Imesh Gunaratne
 
PDF
WSO2 Cloud Strategy Update
Imesh Gunaratne
 
PDF
An Introduction to Go
Imesh Gunaratne
 
PDF
Scale into Multi-Cloud with Containers
Imesh Gunaratne
 
PDF
Revolutionizing WSO2 PaaS with Kubernetes & App Factory
Imesh Gunaratne
 
PDF
Making a Better World with Technology Innovations
Imesh Gunaratne
 
Planning WSO2 Deployments on Pivotal Cloud Foundry
Imesh Gunaratne
 
Planning WSO2 Deployments on DC/OS
Imesh Gunaratne
 
Deep Dive into Kubernetes - Part 2
Imesh Gunaratne
 
WSO2 Container Strategy
Imesh Gunaratne
 
WSO2 API Manager Reference Architecture for DC/OS
Imesh Gunaratne
 
WSO2 API Manager Reference Architecture for Pivotal Cloud Foundry
Imesh Gunaratne
 
WSO2 Kubernetes Reference Architecture - Nov 2017
Imesh Gunaratne
 
WSO2 Cloud and Platform as a Service Strategy
Imesh Gunaratne
 
Planning Your Cloud Strategy
Imesh Gunaratne
 
Deploying WSO2 Middleware on Containers
Imesh Gunaratne
 
Multitenancy in WSO2 Carbon 5 (C5)
Imesh Gunaratne
 
Deploying WSO2 Middleware on Mesos
Imesh Gunaratne
 
Deploying WSO2 Middleware on Kubernetes
Imesh Gunaratne
 
Service Oriented Architecture & Beyond
Imesh Gunaratne
 
Docker for Java Developers
Imesh Gunaratne
 
WSO2 Cloud Strategy Update
Imesh Gunaratne
 
An Introduction to Go
Imesh Gunaratne
 
Scale into Multi-Cloud with Containers
Imesh Gunaratne
 
Revolutionizing WSO2 PaaS with Kubernetes & App Factory
Imesh Gunaratne
 
Making a Better World with Technology Innovations
Imesh Gunaratne
 
Ad

Recently uploaded (20)

PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
Digital Circuits, important subject in CS
contactparinay1
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 

Deep Dive into Kubernetes - Part 1

  • 1. Deep Dive into Kubernetes Part 1 Imesh Gunaratne, WSO2
  • 2. Agenda ● Kubernetes Architecture ● Container Orchestration: ○ Pods ○ Replica Sets ○ Deployments ● Internal Routing ○ Services ● External Routing ○ Ingresses & Ingress Controllers
  • 3. Agenda Cont. ● Configuration Management ○ Config Maps ● Credentials Management ○ Secrets ● Persistent Volumes ● Rolling Out Updates ● Autoscaling ○ Horizontal Pod Autoscalers
  • 4. Agenda Cont. ● Package Management ○ Helm ● Hello World Example
  • 6. Kubernetes Architecture Node 1 Node 2 Node nMaster API Overlay Network UI CLI Container Registry API Server Scheduler Controller etcd
  • 8. Pods ● A pod is a group of containers that share the file system, users, network interfaces, etc ● By default a pod will include two containers: one for the given docker image and other for the network interface C1 C2 Cn apiVersion: v1 kind: Pod metadata: name: myapp-pod labels: app: myapp spec: containers: - name: myapp-container image: busybox command: ['sh', '-c', 'echo Hello Kubernetes! && sleep 3600']
  • 9. Replica Sets ● Replica Sets are used for orchestrating pods ● They define the docker images, resources, env. variables, ports, etc required for creating pods apiVersion: apps/v1 kind: ReplicaSet metadata: name: frontend labels: app: guestbook spec: replicas: 3 selector: matchLabels: tier: frontend matchExpressions: - {key: tier, operator: In} template: metadata: labels: ... spec: containers: - name: php-redis image: foo:bar ports: - containerPort: 80 Replica Set C1 C2
  • 10. Deployments ● A deployment is used for orchestrating pods via replica sets: apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerPort: 80 Replica Set Deployment C1 C2
  • 12. Services kind: Service apiVersion: v1 metadata: name: my-service spec: selector: app: MyApp ports: - protocol: TCP port: 80 targetPort: 9376 Replica Set Deployment Service ● A service provides a layer 4 load balancer for pods: C1 C2
  • 13. Pod to Pod Communication Replica Set A Deployment A ServiceA C1 C2 Deployment B Replica Set B C3 C4 ServiceB
  • 15. Ingresses Replica Set Deployment Service Ingress apiVersion: extensions/v1beta1 kind: Ingress metadata: name: test-ingress annotations: nginx.ingress.kubernetes.io/rewri te-target: / spec: rules: - http: paths: - path: /testpath backend: serviceName: test servicePort: 80 ● An ingress is used for configuring a load balancer for external routing C1 C2
  • 16. Ingresses Replica Set Deployment Service Ingress Ingress Controller apiVersion: extensions/v1beta1 kind: Ingress metadata: name: test-ingress annotations: nginx.ingress.kubernetes.io/rewri te-target: / spec: rules: - http: paths: - path: /testpath backend: serviceName: test servicePort: 80 ● An ingress is used for configuring a load balancer for external routing C1 C2
  • 17. Ingresses Replica Set Deployment Service Ingress Ingress Controller LoadBalancer apiVersion: extensions/v1beta1 kind: Ingress metadata: name: test-ingress annotations: nginx.ingress.kubernetes.io/rewri te-target: / spec: rules: - http: paths: - path: /testpath backend: serviceName: test servicePort: 80 ● An ingress is used for configuring a load balancer for external routing C1 C2
  • 19. ConfigMaps Replica Set Deployment Service Ingress Ingress Controller LoadBalancer Config MapsConfig Files ● Configuration files can be injected into pods using ConfigMaps ● A ConfigMap can be created for key/value pairs, files and folders Config MapsConfig Maps C1 C2
  • 21. Config Maps Secrets Replica Set Deployment Service Ingress Ingress Controller LoadBalancer Config Files ● Sensitive data such as credentials, encryption keys can be securely injected using secrets Config MapsConfig MapsConfig MapsSecrets Config Maps Credentials C1 C2
  • 23. Config Maps Persistent Volumes Replica Set Deployment Config Files Config Maps Credentials C1 C2 Persistent Volume ClaimPersistent Volumes Service ● PVC defines volume size, and type: ReadOnly, ReadWrite, ReadWriteMany
  • 24. Persistent Volume Types ● GCEPersistentDisk ● AWSElasticBlockStore ● AzureFile ● AzureDisk ● FC (Fibre Channel)** ● FlexVolume ● Flocker ● NFS ● iSCSI ● RBD (Ceph Block Device) ● CephFS ● Cinder (OpenStack block storage) ● Glusterfs ● VsphereVolume ● Quobyte Volumes ● VMware Photon ● Portworx Volumes ● ScaleIO Volumes ● StorageOS https://kubernetes.io/docs/concepts/storage/persistent-volumes/#types-of-persistent-volumes
  • 27. Replica Set V1 Deployment V1 V1 Deploying... Deployment Process
  • 28. Replica Set V1 Deployment V1 P1 - V1 P2 - V1 Service C1 C2 V1 Pods Starting... Deployment Process
  • 29. C1 Replica Set V1 Deployment V1 P1 - V1 P2 - V1 Service C2 V1 Pods Activating... Deployment Process
  • 30. C1 Replica Set V1 Deployment V1 C2 P1 - V1 P2 - V1 Service V1 Pods Healthy Deployment Process
  • 31. C1 Replica Set V1 Deployment V1 C2 P1 - V1 P2 - V1 Deployment V2 Service Deploying V2... Rolling Update Process
  • 32. C1 Replica Set V1 Deployment V1 C2 P1 - V1 P2 - V1 Deployment V2 Replica Set V2 Service Deploying V2... Rolling Update Process
  • 33. Replica Set V1 Deployment V1 C2 P1 - V1 P2 - V1 Deployment V2 Replica Set V2 P1 - V2Service C3 V2 Pods Starting... C4 P2 - V2 C1 Rolling Update Process
  • 34. C1 Replica Set V1 Deployment V1 C2 P1 - V1 P2 - V1 Deployment V2 Replica Set V2 C3 P1 - V2Service V2 Pods Activating... P2 - V2 C4 Rolling Update Process
  • 35. Replica Set V1 Deployment V1 P1 - V1 P2 - V1 Deployment V2 Replica Set V2 C3 C4 P1 - V2 P2 - V2 C1 C2 Service V2 Pods Healthy Rolling Update Process
  • 37. Horizontal Pod Autoscalers Replica Set Deployment Service ● Enable autoscaling for pods based on CPU utilization Horizontal Pod Autoscaler Resource Metrics API C1 C2
  • 39. Helm ● Helm is the Kubernetes package manager. ● It uses Charts for defining, installing and upgrading applications on Kubernetes. ● Runtime configurations can be templated and parameterized. ● Existing Charts can be reused and added as dependencies to new Charts. ● Helm is managed by CNCF. https://docs.helm.sh
  • 40. Helm Hello World # templates/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: Name: hello-world spec: replicas: 1 template: metadata: labels: app: hello-world spec: containers: - name: hello-world image: gcr.io/google-samples/node-hello :1.0 ports: - containerPort: 8080 protocol: TCP # chart.yaml name: apps/v1 version: # templates/service.yaml kind: Service apiVersion: v1 metadata: name: hello-world spec: type: NodePort selector: app: hello-world ports: - protocol: TCP port: 8080 targetPort: 8080
  • 44. References ● Kubernetes Documentation: ○ https://kubernetes.io/docs/ ● An Introduction to Kubernetes: ○ https://www.slideshare.net/imesh/an-introduction-to-kubernetes ● WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, and operations: ○ https://www.slideshare.net/BrianGrant11/wso2con-us-2015-kube rnetes-a-platform-for-automating-deployment-scaling-and-operati ons ● Kubernetes: An Overview: ○ https://thenewstack.io/kubernetes-an-overview/
  • 45. References Cont. ● Helm Documentation: ○ https://docs.helm.sh ● The missing CI/CD Kubernetes component: Helm package manager ○ https://medium.com/@gajus/the-missing-ci-cd-kubernetes-compon ent-helm-package-manager-1fe002aac680