SlideShare a Scribd company logo
1 of 59
Download to read offline
Kubernetes at Datadog
scale
Ara Pulido
@arapulido
17 major releases since
2015
+80k commits
+2k contributors
Kubernetes popularity past 5 years
Kubernetes popularity past 5 years
Kubernetes v.s Mariah Carey
● 2 years full time Kubernetes
● CKA; part of the team that created CKAD
● Writing apps for Kubernetes
● User of Kubernetes (15-25 nodes)
● Amateur youtuber (really!)
https://dtdg.co/k8s_es
My journey with Kubernetes
Dozens of clusters
+1K nodes / cluster
Multi-cloud
Survey: number of nodes / cluster
Source: https://github.com/MagalixCorp/kubernetes-autoscale-survey
Let’s talk about the
elephant in the room
Kubernetes
networking
is not easy
POD NETWORKING
DNS
SERVICE NETWORKING
Kubernetes networking 101
Pod
172.17.0.2
Pod
172.17.0.3
GET EVERY POD A UNIQUE IP
MAKE SURE EVERY POD CAN TALK TO ANY OTHER POD IN THE CLUSTER
Pod networking
Client
172.17.0.6
Pod
172.17.0.4
Pod
172.17.0.5
Service
10.107.122.52
kube-proxy
Service networking
Service
10.97.239.227myservice.default.svc.cluster.local
DNS
Pod networking
Pod
172.17.0.2
Pod
172.17.0.3
GET EVERY POD A UNIQUE IP
MAKE SURE EVERY POD CAN TALK TO ANY OTHER POD IN THE CLUSTER
Pod
172.17.0.2
Pod
172.17.0.3
CNI Container Network Interface
Pod
10.244.2.1
10.244.1.0/24
10.244.0.0/16
10.244.2.0/24
10.244.0.0/16
cni0
flannel0
cni0
flannel0
Pod
10.244.1.1
Overlays (flannel, weavenet)
192.168.0.1 192.168.0.2
Pod
10.244.2.1
10.244.1.0/24
10.244.0.0/16
10.244.2.0/24
10.244.0.0/16
cni0
flannel0
cni0
flannel0
Pod
10.244.1.1
Overlays (flannel, weavenet)
I WAS HERE
192.168.0.1 192.168.0.2
Pod
10.244.2.1
10.244.1.0/24
10.244.0.0/16
10.244.2.0/24
10.244.0.0/16
cni0
flannel0
cni0
flannel0
Pod
10.244.1.1
Overlays (flannel, weavenet)
192.168.0.1 192.168.0.2
10.244.1.0/24 dev cni0 proto kernel scope link src 10.244.1.0
10.244.0.0/16 dev flannel proto kernel scope link src 10.244.1.1
Overlays
Src: 192.168.0.1
Dst: 192.168.0.2
Src: 10.244.1.1
Dst: 10.244.2.1
Pod
10.244.2.1
10.244.1.0/24
10.244.0.0/16
10.244.2.0/24
10.244.0.0/16
cni0
flannel0
cni0
flannel0
Pod
10.244.1.1
192.168.0.1 192.168.0.2
Pod
10.244.162.131/32 10.244.143.129/32calixxxx calixxxx
Pod
10.244.162.131
192.168.0.1 192.168.0.2
BGP BGP
BGP (Calico)
10.244.143.129
10.244.162.131 dev cali12d4a061371 scope link
10.244.143.129 via 192.168.0.2 dev eth0
Calico (BGP)
10.244.143.129 dev cali12d4bf881 scope link
10.244.162.131 via 192.168.0.1 dev eth0
Pod
10.244.162.131/32 10.244.143.129/32calixxxx calixxxx
Pod
10.244.162.131
192.168.0.1 192.168.0.2
BGP BGP
10.244.143.129
Direct Pod Routing (EKS, Lyft)
Pod
10.0.0.3
Pod
10.0.0.4
SDN
Direct Pod Routing (EKS, Lyft)
Pod
10.0.0.3
Pod
10.0.0.4
SDN
DATADOG
Direct Pod Routing (EKS, Lyft)
Pod
10.0.0.3
Pod
10.0.0.4
SDN
Be ready to become an “expert”
in the CNI plugin of your choice
(yay!!)
Service networking
Client
172.17.0.6
Pod 1
172.17.0.4
Pod 2
172.17.0.5
Service
10.107.122.52
kube-proxy
Client
172.17.0.6
Pod 1
172.17.0.4
Pod 2
172.17.0.5
Iptables
10.107.122.52
kube-proxy API
Watch svc, endpoints
iptables mode (default)
Client
172.17.0.6
Pod 1
172.17.0.4
Pod 2
172.17.0.5
Iptables
10.107.122.52
kube-proxy API
Watch svc, endpoints
iptables mode (default)
I WAS HERE
Client
172.17.0.6
Pod 1
172.17.0.4
Pod 2
172.17.0.5
Iptables
10.107.122.52
kube-proxy API
Watch svc, endpoints
iptables mode (default)
Chain KUBE-SERVICES (2 references)
KUBE-SVC-4N57TFCL4MD7ZTDA tcp -- anywhere 10.107.122.52
/* default/nginx: cluster IP */ tcp dpt:www
Chain KUBE-SVC-4N57TFCL4MD7ZTDA (1 references)
target prot opt source destination
KUBE-SEP-UZXILYFQQ2IZUWN5 all -- anywhere anywhere
statistic mode random probability 0.50000000000
KUBE-SEP-43IWXJI557JKCKCF all -- anywhere anywhere
Chain KUBE-SEP-43IWXJI557JKCKCF (1 references)
target prot opt source destination
KUBE-MARK-MASQ all -- 172.17.0.5 anywhere
DNAT tcp -- anywhere anywhere tcp
to:172.17.0.5:80
iptables mode (default)
GROWS LINEARLY WITH PODS AND SERVICES
THERE IS NO ROOM FOR MORE FEATURES
FOR EVERY CHANGE, THE WHOLE TABLE NEEDS TO BE RESYNC
iptables mode (default)
IPVS mode
GA SINCE 1.11
GA SINCE 1.11
IPVS mode
DATADOG
ATOMIC CHANGES (NO NEED TO RESYNC EVERY RULE)
O(1) COMPLEXITY
DIFFERENT LOAD BALANCING ALGORITHMS (RR, LEAST CONN, etc.)
ipvsadm -ln --tcp-service 10.107.122.52:80
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 10.107.122.52:80 rr
-> 172.17.0.4:80 Masq 1 0 37
-> 172.17.0.5:80 Masq 1 0 44
GA SINCE 1.11
IPVS mode
Source: https://www.projectcalico.org/comparing-kube-proxy-modes-iptables-or-ipvs/
iptables v.s. IPVS
Source: https://www.projectcalico.org/comparing-kube-proxy-modes-iptables-or-ipvs/
iptables v.s. IPVS
Many large deployments are
already moving to IPVS and newer
solutions are being developed
(eBPF based)
DNS
Service
10.97.239.227myservice.default.svc.cluster.local
Service
10.97.239.227myservice.default.svc.cluster.local
I WAS HERE
` Client
DNS
Cache CoreDNS
DNS Local Cache
` Client
DNS
Cache CoreDNS
DNS Local Cache
DATADOG
` Client
DNS
Cache CoreDNS
DNS Local Cache
NodeLocal DNSCache is now part
of Kubernetes (Beta 1.15)
Take aways
The bad
KUBERNETES IS FLEXIBLE FOR DEVS, STILL COMPLEX FOR OPS
YOU WILL HIT BUGS
CNI PLUGINS WORK *VERY* DIFFERENTLY. LEARN YOURS.
The good
THE ECOSYSTEM PICKS UP QUICKLY
DEVELOPMENT EXPERIENCE DOESN’T CHANGE (MUCH)
CHANGES DON’T HAVE TO HAPPEN FOR ALL WORKLOADS DIRECTLY
Thank you!
Ara Pulido
@arapulido
Thank you!
Ara Pulido
@arapulido
WE ARE HIRING

More Related Content

What's hot

What's hot (20)

What's rancher v2.1.0 JA
What's rancher v2.1.0 JAWhat's rancher v2.1.0 JA
What's rancher v2.1.0 JA
 
What's Rio
What's RioWhat's Rio
What's Rio
 
Cncf k8s_network_02
Cncf k8s_network_02Cncf k8s_network_02
Cncf k8s_network_02
 
Pod Sandbox workflow creation from Dockershim
Pod Sandbox workflow creation from DockershimPod Sandbox workflow creation from Dockershim
Pod Sandbox workflow creation from Dockershim
 
DOD 2016 - Kamil Szczygieł - Patching 100 OpenStack Compute Nodes with Zero-d...
DOD 2016 - Kamil Szczygieł - Patching 100 OpenStack Compute Nodes with Zero-d...DOD 2016 - Kamil Szczygieł - Patching 100 OpenStack Compute Nodes with Zero-d...
DOD 2016 - Kamil Szczygieł - Patching 100 OpenStack Compute Nodes with Zero-d...
 
An Introduction to Rancher
An Introduction to RancherAn Introduction to Rancher
An Introduction to Rancher
 
05.10.2017 AWS User Group Meetup - FALLACIES OF DISTRIBUTED COMPUTING WITH KU...
05.10.2017 AWS User Group Meetup - FALLACIES OF DISTRIBUTED COMPUTING WITH KU...05.10.2017 AWS User Group Meetup - FALLACIES OF DISTRIBUTED COMPUTING WITH KU...
05.10.2017 AWS User Group Meetup - FALLACIES OF DISTRIBUTED COMPUTING WITH KU...
 
[En] IPVS for Docker Containers
[En] IPVS for Docker Containers[En] IPVS for Docker Containers
[En] IPVS for Docker Containers
 
zebra & openconfigd Introduction
zebra & openconfigd Introductionzebra & openconfigd Introduction
zebra & openconfigd Introduction
 
Advanced Scheduling in Kubernetes
Advanced Scheduling in KubernetesAdvanced Scheduling in Kubernetes
Advanced Scheduling in Kubernetes
 
Kubernetes and the hybrid cloud with Skupper | DevNation tech talk
Kubernetes and the hybrid cloud with Skupper | DevNation tech talkKubernetes and the hybrid cloud with Skupper | DevNation tech talk
Kubernetes and the hybrid cloud with Skupper | DevNation tech talk
 
Demystifying Docker for Data Scientists by Shaheen
Demystifying Docker for Data Scientists by ShaheenDemystifying Docker for Data Scientists by Shaheen
Demystifying Docker for Data Scientists by Shaheen
 
Hybrid vFirewall ONAP use case
Hybrid vFirewall ONAP use caseHybrid vFirewall ONAP use case
Hybrid vFirewall ONAP use case
 
Securing Your Containerized Applications with NGINX
Securing Your Containerized Applications with NGINXSecuring Your Containerized Applications with NGINX
Securing Your Containerized Applications with NGINX
 
Packet Walk(s) In Kubernetes
Packet Walk(s) In KubernetesPacket Walk(s) In Kubernetes
Packet Walk(s) In Kubernetes
 
Running Kubernetes in Production: A Million Ways to Crash Your Cluster - DevO...
Running Kubernetes in Production: A Million Ways to Crash Your Cluster - DevO...Running Kubernetes in Production: A Million Ways to Crash Your Cluster - DevO...
Running Kubernetes in Production: A Million Ways to Crash Your Cluster - DevO...
 
Kubernetes & the 12 factor cloud apps
Kubernetes & the 12 factor cloud appsKubernetes & the 12 factor cloud apps
Kubernetes & the 12 factor cloud apps
 
Kubernetes on AWS at Zalando: Failures & Learnings - DevOps NRW
Kubernetes on AWS at Zalando: Failures & Learnings - DevOps NRWKubernetes on AWS at Zalando: Failures & Learnings - DevOps NRW
Kubernetes on AWS at Zalando: Failures & Learnings - DevOps NRW
 
KubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipeline
KubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipelineKubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipeline
KubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipeline
 
Evolution of kube-proxy (Brussels, Fosdem 2020)
Evolution of kube-proxy (Brussels, Fosdem 2020)Evolution of kube-proxy (Brussels, Fosdem 2020)
Evolution of kube-proxy (Brussels, Fosdem 2020)
 

Similar to Kubernetes at Datadog Scale - Ara Pulido

ql.io: Consuming HTTP at Scale
ql.io: Consuming HTTP at Scale ql.io: Consuming HTTP at Scale
ql.io: Consuming HTTP at Scale
Subbu Allamaraju
 

Similar to Kubernetes at Datadog Scale - Ara Pulido (20)

Deep dive in container service discovery
Deep dive in container service discoveryDeep dive in container service discovery
Deep dive in container service discovery
 
Kubernetes internals (Kubernetes 해부하기)
Kubernetes internals (Kubernetes 해부하기)Kubernetes internals (Kubernetes 해부하기)
Kubernetes internals (Kubernetes 해부하기)
 
Nynog-K8s-networking-101.pptx
Nynog-K8s-networking-101.pptxNynog-K8s-networking-101.pptx
Nynog-K8s-networking-101.pptx
 
Kubernetes Networking - Giragadurai Vallirajan
Kubernetes Networking - Giragadurai VallirajanKubernetes Networking - Giragadurai Vallirajan
Kubernetes Networking - Giragadurai Vallirajan
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
 
KubeCon EU 2016: Using Traffic Control to Test Apps in Kubernetes
KubeCon EU 2016: Using Traffic Control to Test Apps in KubernetesKubeCon EU 2016: Using Traffic Control to Test Apps in Kubernetes
KubeCon EU 2016: Using Traffic Control to Test Apps in Kubernetes
 
5 Kubernetes.pdf 5 Kubernetes.pdf 5 Kubernetes.pdf
5 Kubernetes.pdf 5 Kubernetes.pdf 5 Kubernetes.pdf5 Kubernetes.pdf 5 Kubernetes.pdf 5 Kubernetes.pdf
5 Kubernetes.pdf 5 Kubernetes.pdf 5 Kubernetes.pdf
 
ql.io: Consuming HTTP at Scale
ql.io: Consuming HTTP at Scale ql.io: Consuming HTTP at Scale
ql.io: Consuming HTTP at Scale
 
[오픈소스컨설팅] Linux Network Troubleshooting
[오픈소스컨설팅] Linux Network Troubleshooting[오픈소스컨설팅] Linux Network Troubleshooting
[오픈소스컨설팅] Linux Network Troubleshooting
 
Replacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with CiliumReplacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with Cilium
 
Networking in Kubernetes
Networking in KubernetesNetworking in Kubernetes
Networking in Kubernetes
 
Kubernetes - Sailing a Sea of Containers
Kubernetes - Sailing a Sea of ContainersKubernetes - Sailing a Sea of Containers
Kubernetes - Sailing a Sea of Containers
 
Scaling Kubernetes to Support 50000 Services.pptx
Scaling Kubernetes to Support 50000 Services.pptxScaling Kubernetes to Support 50000 Services.pptx
Scaling Kubernetes to Support 50000 Services.pptx
 
IP Routing, AWS, and Docker
IP Routing, AWS, and DockerIP Routing, AWS, and Docker
IP Routing, AWS, and Docker
 
DCEU 18: Docker Container Networking
DCEU 18: Docker Container NetworkingDCEU 18: Docker Container Networking
DCEU 18: Docker Container Networking
 
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on CloudDayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
 
K8s上の containerized cloud foundryとcontainerized open stackをprometheusで監視してみる
K8s上の containerized cloud foundryとcontainerized open stackをprometheusで監視してみるK8s上の containerized cloud foundryとcontainerized open stackをprometheusで監視してみる
K8s上の containerized cloud foundryとcontainerized open stackをprometheusで監視してみる
 
Implementing an IPv6 Enabled Environment for a Public Cloud Tenant
Implementing an IPv6 Enabled Environment for a Public Cloud TenantImplementing an IPv6 Enabled Environment for a Public Cloud Tenant
Implementing an IPv6 Enabled Environment for a Public Cloud Tenant
 
Deeper Dive in Docker Overlay Networks
Deeper Dive in Docker Overlay NetworksDeeper Dive in Docker Overlay Networks
Deeper Dive in Docker Overlay Networks
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

Kubernetes at Datadog Scale - Ara Pulido