SlideShare a Scribd company logo
k8s
Diego Pacheco
Kubernetes
Companies using k8s
Concepts
❏ Containers
❏ Pods, ReplicaSets, Volumes, PersistentVolumes...
❏ Deployments, Loadbalancer, Labels, Selectors...
❏ Controllers, HPA, ConfigMaps, Secrets...
❏ Master, Worker nodes, Etcd
❏ GitOps
Containers
❏ Isolation (Cpu, memry)
❏ Linux Kernel Features
❏ Packing / Specification
❏ Images, Image Repositories
❏ RuntimeClasses: Alpha == CRI
K8s files: Specs
❏ Declarative
❏ Spected State
❏ Version Control
❏ Rollout and Rollback
❏ All in one Vs one concept per yaml file
Nodes
❏ Master and Worker nodes
❏ K8s rely on ETCD
❏ ETCD = (Distributed k/v store)
❏ Worker Nodes (minions)
❏ You app runs on worker nodes
❏ 3 Masters nodes for HA
Worker
Node 1
Worker
Node 2
Master
Pod
❏ Basic Building block in k8s
❏ Smaller Deployment Unit
❏ Group of Co-located Containers
❏ Share: Network interface + Volumes
❏ Has 1-N containers(docker)
Pod
Container 1
Container 2
Pod: spec
Labels and Selectors
❏ Labels: K/V props attached in to objects.
❏ Labels are used for identification: Release, Version, Tier, Account, Project
❏ Selectors: Select Resources based on labels i.e tier=frontend, =, !=
❏ Selectors support expressions: like in, notin, etc…
❏ kubectl get pods -l environment=production,tier=frontend
ConfigMaps
❏ K/V pairs
❏ Decouple Images(Containers) from configurations
❏ For non-sensitive information - Application specific
❏ Can be exposed via: Environment vars or Volumes.
ConfigMaps: Spec
Secrets
❏ K/V pairs
❏ Secret: Hold sensitive information: Tokens, passwords, ssh keys.
❏ Secrets are safer than putting info into Pods.
❏ Secrets can be exposed via Environment vars or Volumes.
Secret: Spec
Volume
❏ Disks in Containers are Ephemeral
❏ Don't lose the State
❏ Share with other containers(Pod)
❏ Several Types:
❏ EmptyDir | local
❏ ConfigMap
❏ GlusterFS
❏ EBS(AWS), PD(GCP), Azure and much more...
Pod
Container 1
Container 2
Volume
Volume: spec
Controller (RCs)
❏ Old Pattern - now ReplicaSets are Recommended.
❏ Similar to a Supervisor process
❏ Use Cases: Rescheduling, Scaling, Rolling Updates
❏ Liveness and Readiness probes
DaemonSet and Job
❏ Similar to ReplicationController (RCS)
❏ DaemonSet: Nodes are Copy or Deleted from Pods.
❏ DaemonSet: Used for: Gluster, Ceph,FluentD, logstash, mon agents
❏ Job: Make sure pods successfully terminate.
❏ Job: Used for Batch Processing: One time tasks, Spark / Flink
ReplicatSet
❏ Scale Up or Scale Down Pods
❏ Pods can die(no resurrection)
❏ Make sure pods are running(available)
❏ By number of (same) pods (i.e: 3,5,7,10 etc…)
❏ Decoupled from Pods - use Selectors(labels == K/V config pairs)
❏ In production we use Deployments instead(rollout capability)
Pod 1
Container 1
Pod 2
Container 2
ReplicaSet
Template: 2
ReplicaSet: spec
Service
❏ Sometimes called *Microservice*
❏ Abstraction on top of Pods
❏ Define policies to access the service
❏ Defined by Label / Selector
❏ Have they own DNS names
❏ Several Types:
❏ ClusterIP, NodePort, Loadbalancer, Ingress
❏ AWs, GCP, OpenStack and much more...
Pod 1
Container 1
Pod 2
Container 2
Service
Types of Service
❏ ClusterIp:
❏ Good for: Debugging
❏ Good for: Dashboarding
❏ No External Access (need to use: kubectl proxy --port=8080)
http://localhost:8080/api/v1/proxy/namespaces/<NAMESPACE>/services/<SERVICE-NAME>
:<PORT-NAME>/
Types of Service
❏ NodePort:
❏ Open a Port on a NODE VM
❏ Only 1 Service per Port (ports available: 30000–32767)
❏ If Node/VM Ip change you need to deal with it
❏ Good for: Temporary access
❏ Not recommended for production
Types of Service
❏ Loadbalancer:
❏ Classical LoadBalancer as name says :-)
❏ Several Protocols: HTTP, TCP, UDP, Websockets, gRPC
❏ Great for Production
❏ BUT It can be expensive == 1 LB per Service
Types of Service
❏ Ingress:
❏ Multiple service under same IP
❏ Smart Routing
❏ It can get complex easily
❏ Several Options: Nginx, Istio, Google Load Balancer, and more...
Service: spec
Deployment
❏ Production way to do things :-)
❏ Declarative Updates for Pods and ReplicaSets
❏ Scaling for Cpu Utilization
❏ Support for Selectors
❏ Pause / Resuming
❏ Strategies:
❏ Rolling updates
❏ Destroy/Create
Deployment: Spec
HPA
❏ Beta
❏ Horizontal Pod Autoscaler (HPA)
❏ Works with the Metrics Server component
❏ Scale RCs by CPU
❏ Scale by App custom metrics. I.e: queue_depth or Inflight-Connections.
HPA:Spec
CA
❏ Beta
❏ Cluster Autoscaler
❏ More | Less Worker Nodes onDemand
❏ 2 Conditions to trigger:
❏ Fail to schulle pods due lack of resource
❏ Pods that are not being used can be replaced
CA: Spec
CA: Spec
Architecture
k8s
Diego Pacheco

More Related Content

PDF
Arbiter volumes in gluster
PDF
Deploying pNFS over Distributed File Storage w/ Jiffin Tony Thottan and Niels...
PDF
GFProxy: Scaling the GlusterFS FUSE Client
PPTX
Practical Glusto Example
PDF
Hands On Gluster with Jeff Darcy
PDF
Integration of Glusterfs in to commvault simpana
PDF
Ceph RBD Update - June 2021
PDF
How to manage stateful applications in Kubernetes
Arbiter volumes in gluster
Deploying pNFS over Distributed File Storage w/ Jiffin Tony Thottan and Niels...
GFProxy: Scaling the GlusterFS FUSE Client
Practical Glusto Example
Hands On Gluster with Jeff Darcy
Integration of Glusterfs in to commvault simpana
Ceph RBD Update - June 2021
How to manage stateful applications in Kubernetes

What's hot (20)

PDF
Lcna 2012-tutorial
PDF
Gluster as Block Store in Containers
PDF
Up and Running with Glusto & Glusto-Tests in 5 Minutes (or less)
PDF
Gluster Containerized Storage for Cloud Applications
PPTX
ops300 Week5 storage (1)
PDF
Challenges with Gluster and Persistent Memory with Dan Lambright
PDF
Ceph Month 2021: RADOS Update
ODP
Lcna tutorial-2012
PDF
Scaling Islandora
PDF
QCon 2017 - Java/JVM com Docker em produção: lições das trincheiras
PPTX
Storm distributed cache workshop
PPTX
Your 1st Ceph cluster
PDF
NoSQL 동향
ODP
Accessing gluster ufo_-_eco_willson
PDF
Thanos - Prometheus on Scale
PDF
Breaking the RpiDocker challenge
PDF
Salvatore Sanfilippo – How Redis Cluster works, and why - NoSQL matters Barce...
PPTX
Disaggregating Ceph using NVMeoF
PDF
Ceph QoS: How to support QoS in distributed storage system - Taewoong Kim
ODP
Gluster technical overview
Lcna 2012-tutorial
Gluster as Block Store in Containers
Up and Running with Glusto & Glusto-Tests in 5 Minutes (or less)
Gluster Containerized Storage for Cloud Applications
ops300 Week5 storage (1)
Challenges with Gluster and Persistent Memory with Dan Lambright
Ceph Month 2021: RADOS Update
Lcna tutorial-2012
Scaling Islandora
QCon 2017 - Java/JVM com Docker em produção: lições das trincheiras
Storm distributed cache workshop
Your 1st Ceph cluster
NoSQL 동향
Accessing gluster ufo_-_eco_willson
Thanos - Prometheus on Scale
Breaking the RpiDocker challenge
Salvatore Sanfilippo – How Redis Cluster works, and why - NoSQL matters Barce...
Disaggregating Ceph using NVMeoF
Ceph QoS: How to support QoS in distributed storage system - Taewoong Kim
Gluster technical overview
Ad

Similar to Kubernetes (20)

PDF
Experiences building a multi region cassandra operations orchestrator on aws
PDF
ES & Kafka
PDF
NPF scripting with Lua by Lourival Vieira Neto
PDF
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
PDF
Kubernetes at Datadog the very hard way
PDF
Container orchestration
PDF
Containers > VMs
PPTX
Rook - cloud-native storage
PDF
Frontend Track NodeJS
PDF
6 Months Sailing with Docker in Production
PDF
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
PDF
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
PDF
DockerCon EU '17 - Dockerizing Aurea
PDF
Docker Insight
PPTX
Kubernetes Introduction
PPTX
Open stack HA - Theory to Reality
PDF
DevEx | there’s no place like k3s
PDF
Openstack on Fedora, Fedora on Openstack: An Introduction to cloud IaaS
PDF
Ippevent : openshift Introduction
PDF
Strata - 03/31/2012
Experiences building a multi region cassandra operations orchestrator on aws
ES & Kafka
NPF scripting with Lua by Lourival Vieira Neto
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Kubernetes at Datadog the very hard way
Container orchestration
Containers > VMs
Rook - cloud-native storage
Frontend Track NodeJS
6 Months Sailing with Docker in Production
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
DockerCon EU '17 - Dockerizing Aurea
Docker Insight
Kubernetes Introduction
Open stack HA - Theory to Reality
DevEx | there’s no place like k3s
Openstack on Fedora, Fedora on Openstack: An Introduction to cloud IaaS
Ippevent : openshift Introduction
Strata - 03/31/2012
Ad

More from Diego Pacheco (20)

PDF
Naming Things Book : Simple Book Review!
PDF
Continuous Discovery Habits Book Review.pdf
PDF
Thoughts about Shape Up
PDF
Holacracy
PDF
AWS IAM
PDF
PDF
Encryption Deep Dive
PDF
Sec 101
PDF
Reflections on SCM
PDF
Management: Doing the non-obvious! III
PDF
Design is not Subjective
PDF
Architecture & Engineering : Doing the non-obvious!
PDF
Management doing the non-obvious II
PDF
Testing in production
PDF
Nine lies about work
PDF
Management: doing the nonobvious!
PDF
AI and the Future
PDF
Dealing with dependencies
PDF
Dealing with dependencies in tests
PDF
Kanban 2020
Naming Things Book : Simple Book Review!
Continuous Discovery Habits Book Review.pdf
Thoughts about Shape Up
Holacracy
AWS IAM
Encryption Deep Dive
Sec 101
Reflections on SCM
Management: Doing the non-obvious! III
Design is not Subjective
Architecture & Engineering : Doing the non-obvious!
Management doing the non-obvious II
Testing in production
Nine lies about work
Management: doing the nonobvious!
AI and the Future
Dealing with dependencies
Dealing with dependencies in tests
Kanban 2020

Recently uploaded (20)

PDF
Modernizing your data center with Dell and AMD
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
KodekX | Application Modernization Development
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
cuic standard and advanced reporting.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Approach and Philosophy of On baking technology
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
Modernizing your data center with Dell and AMD
Network Security Unit 5.pdf for BCA BBA.
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
KodekX | Application Modernization Development
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Advanced methodologies resolving dimensionality complications for autism neur...
cuic standard and advanced reporting.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
NewMind AI Weekly Chronicles - August'25 Week I
Dropbox Q2 2025 Financial Results & Investor Presentation
Approach and Philosophy of On baking technology
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Understanding_Digital_Forensics_Presentation.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Reach Out and Touch Someone: Haptics and Empathic Computing
Per capita expenditure prediction using model stacking based on satellite ima...

Kubernetes

  • 4. Concepts ❏ Containers ❏ Pods, ReplicaSets, Volumes, PersistentVolumes... ❏ Deployments, Loadbalancer, Labels, Selectors... ❏ Controllers, HPA, ConfigMaps, Secrets... ❏ Master, Worker nodes, Etcd ❏ GitOps
  • 5. Containers ❏ Isolation (Cpu, memry) ❏ Linux Kernel Features ❏ Packing / Specification ❏ Images, Image Repositories ❏ RuntimeClasses: Alpha == CRI
  • 6. K8s files: Specs ❏ Declarative ❏ Spected State ❏ Version Control ❏ Rollout and Rollback ❏ All in one Vs one concept per yaml file
  • 7. Nodes ❏ Master and Worker nodes ❏ K8s rely on ETCD ❏ ETCD = (Distributed k/v store) ❏ Worker Nodes (minions) ❏ You app runs on worker nodes ❏ 3 Masters nodes for HA Worker Node 1 Worker Node 2 Master
  • 8. Pod ❏ Basic Building block in k8s ❏ Smaller Deployment Unit ❏ Group of Co-located Containers ❏ Share: Network interface + Volumes ❏ Has 1-N containers(docker) Pod Container 1 Container 2
  • 10. Labels and Selectors ❏ Labels: K/V props attached in to objects. ❏ Labels are used for identification: Release, Version, Tier, Account, Project ❏ Selectors: Select Resources based on labels i.e tier=frontend, =, != ❏ Selectors support expressions: like in, notin, etc… ❏ kubectl get pods -l environment=production,tier=frontend
  • 11. ConfigMaps ❏ K/V pairs ❏ Decouple Images(Containers) from configurations ❏ For non-sensitive information - Application specific ❏ Can be exposed via: Environment vars or Volumes.
  • 13. Secrets ❏ K/V pairs ❏ Secret: Hold sensitive information: Tokens, passwords, ssh keys. ❏ Secrets are safer than putting info into Pods. ❏ Secrets can be exposed via Environment vars or Volumes.
  • 15. Volume ❏ Disks in Containers are Ephemeral ❏ Don't lose the State ❏ Share with other containers(Pod) ❏ Several Types: ❏ EmptyDir | local ❏ ConfigMap ❏ GlusterFS ❏ EBS(AWS), PD(GCP), Azure and much more... Pod Container 1 Container 2 Volume
  • 17. Controller (RCs) ❏ Old Pattern - now ReplicaSets are Recommended. ❏ Similar to a Supervisor process ❏ Use Cases: Rescheduling, Scaling, Rolling Updates ❏ Liveness and Readiness probes
  • 18. DaemonSet and Job ❏ Similar to ReplicationController (RCS) ❏ DaemonSet: Nodes are Copy or Deleted from Pods. ❏ DaemonSet: Used for: Gluster, Ceph,FluentD, logstash, mon agents ❏ Job: Make sure pods successfully terminate. ❏ Job: Used for Batch Processing: One time tasks, Spark / Flink
  • 19. ReplicatSet ❏ Scale Up or Scale Down Pods ❏ Pods can die(no resurrection) ❏ Make sure pods are running(available) ❏ By number of (same) pods (i.e: 3,5,7,10 etc…) ❏ Decoupled from Pods - use Selectors(labels == K/V config pairs) ❏ In production we use Deployments instead(rollout capability) Pod 1 Container 1 Pod 2 Container 2 ReplicaSet Template: 2
  • 21. Service ❏ Sometimes called *Microservice* ❏ Abstraction on top of Pods ❏ Define policies to access the service ❏ Defined by Label / Selector ❏ Have they own DNS names ❏ Several Types: ❏ ClusterIP, NodePort, Loadbalancer, Ingress ❏ AWs, GCP, OpenStack and much more... Pod 1 Container 1 Pod 2 Container 2 Service
  • 22. Types of Service ❏ ClusterIp: ❏ Good for: Debugging ❏ Good for: Dashboarding ❏ No External Access (need to use: kubectl proxy --port=8080) http://localhost:8080/api/v1/proxy/namespaces/<NAMESPACE>/services/<SERVICE-NAME> :<PORT-NAME>/
  • 23. Types of Service ❏ NodePort: ❏ Open a Port on a NODE VM ❏ Only 1 Service per Port (ports available: 30000–32767) ❏ If Node/VM Ip change you need to deal with it ❏ Good for: Temporary access ❏ Not recommended for production
  • 24. Types of Service ❏ Loadbalancer: ❏ Classical LoadBalancer as name says :-) ❏ Several Protocols: HTTP, TCP, UDP, Websockets, gRPC ❏ Great for Production ❏ BUT It can be expensive == 1 LB per Service
  • 25. Types of Service ❏ Ingress: ❏ Multiple service under same IP ❏ Smart Routing ❏ It can get complex easily ❏ Several Options: Nginx, Istio, Google Load Balancer, and more...
  • 27. Deployment ❏ Production way to do things :-) ❏ Declarative Updates for Pods and ReplicaSets ❏ Scaling for Cpu Utilization ❏ Support for Selectors ❏ Pause / Resuming ❏ Strategies: ❏ Rolling updates ❏ Destroy/Create
  • 29. HPA ❏ Beta ❏ Horizontal Pod Autoscaler (HPA) ❏ Works with the Metrics Server component ❏ Scale RCs by CPU ❏ Scale by App custom metrics. I.e: queue_depth or Inflight-Connections.
  • 31. CA ❏ Beta ❏ Cluster Autoscaler ❏ More | Less Worker Nodes onDemand ❏ 2 Conditions to trigger: ❏ Fail to schulle pods due lack of resource ❏ Pods that are not being used can be replaced