SlideShare a Scribd company logo
Révolution eBPF
Un noyau Linux dynamique
Speaker :
Raphaël Pinson, @raphink | @raphink@hachyderm.io
#KCDFrance 2023
⬢ What is eBPF?
#KCDFrance 2023
Agenda
@raphink | @raphink@hachyderm.io
⬢ What is eBPF?
⬢ Principles
#KCDFrance 2023
Agenda
@raphink | @raphink@hachyderm.io
⬢ What is eBPF?
⬢ Principles
⬢ Observability
#KCDFrance 2023
Agenda
@raphink | @raphink@hachyderm.io
⬢ What is eBPF?
⬢ Principles
⬢ Observability
⬢ Networking
#KCDFrance 2023
Agenda
@raphink | @raphink@hachyderm.io
⬢ What is eBPF?
⬢ Principles
⬢ Observability
⬢ Networking
⬢ Security
#KCDFrance 2023
Agenda
@raphink | @raphink@hachyderm.io
⬢ What is eBPF?
⬢ Principles
⬢ Observability
⬢ Networking
⬢ Security
⬢ The Future
#KCDFrance 2023
Agenda
@raphink | @raphink@hachyderm.io
The Linux Kernel
#KCDFrance 2023
The Power Behind Modern Technology
- From cars to servers to fridges
- Foundation of the GNU/Linux operating system
- Most widely used operating system in the
world
- Powers the vast majority of:
- embedded systems / IoT
- Cloud Server
- Super Computers
@raphink | @raphink@hachyderm.io
Before
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
With
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
Have you used eBPF?
#KCDFrance 2023
eBPF is already used in many places
- Load balancing
- DDOS protection on large Internet platforms
- Kernel live-patching (5.7+ with LSM/eBPF)
- Android (e.g. app data stats)
@raphink | @raphink@hachyderm.io
Who am I
#KCDFrance 2023
Raphaël Pinson
Solutions Architect @ Isovalent
@raphink | @raphink@hachyderm.io
#KCDFrance 2023
What is eBPF?
@raphink | @raphink@hachyderm.io
#KCDFrance 2023
Makes the Linux kernel
programmable in a
secure and efficient way.
“What JavaScript is to the
browser, eBPF is to the
Linux Kernel”
@raphink | @raphink@hachyderm.io
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
#KCDFrance 2023
Principles
@raphink | @raphink@hachyderm.io
How does it work?
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
How does it work?
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
How does it work?
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
How does it work?
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
How does it work?
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
How does it work?
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
How does it work?
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
How does it work?
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
eBPF Helpers
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
Stacks & hooks
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
BPF / user-space communication
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
SDK (cilium/ebpf)
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
SDK (cilium/ebpf)
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
SDK (cilium/ebpf)
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
SDK (cilium/ebpf)
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
Safety
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
Performance
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
Cloud Native Identities
#KCDFrance 2023
eBPF “understands” Cloud Native identities:
- in kernel observability
- in network traffic
- in kernel security
@raphink | @raphink@hachyderm.io
eBPF Projects and SDKs
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
Cilium & Friends
#KCDFrance 2023
- performance gains
(no need for iptables, bypass TCP/IP)
- simpler architecture
(e.g. no sidecar proxy for Service Mesh)
Cilium
@raphink | @raphink@hachyderm.io
Cilium & Friends
#KCDFrance 2023
- performance gains
(no need for iptables, bypass TCP/IP)
- simpler architecture
(e.g. no sidecar proxy for Service Mesh)
Cilium
Hubble
- fine-grained network observability
- exports to SIEM
- support for OpenTelemetry
@raphink | @raphink@hachyderm.io
Cilium & Friends
#KCDFrance 2023
- performance gains
(no need for iptables, bypass TCP/IP)
- simpler architecture
(e.g. no sidecar proxy for Service Mesh)
Cilium
Hubble
- fine-grained network observability
- exports to SIEM
- support for OpenTelemetry
Tetragon
- observe & export kernel events
- act on events (e.g. SIGKILL)
@raphink | @raphink@hachyderm.io
#KCDFrance 2023
Observability
@raphink | @raphink@hachyderm.io
Observability
#KCDFrance 2023
Observe directly in the kernel
- Low-overhead tracing/observability
- Example: network performance / SRTT / micro-bursts
- HTTP / TLS in-kernel visibility
- Troubleshooting prod on the fly (see bpftrace)
@raphink | @raphink@hachyderm.io
Observability
#KCDFrance 2023
Observe directly in the kernel
- Low-overhead tracing/observability
- Example: network performance / SRTT / micro-bursts
- HTTP / TLS in-kernel visibility
- Troubleshooting prod on the fly (see bpftrace)
Example software
- BCC
- bpftrace
- Cilium (network)
- Cilium Tetragon (system)
@raphink | @raphink@hachyderm.io
Observability: bpftrace
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
tiefighter 1/1 Running 0 2m34s
xwing 1/1 Running 0 2m34s
deathstar-5b7489bc84-crlxh 1/1 Running 0 2m34s
deathstar-5b7489bc84-j7qwq 1/1 Running 0 2m34s
Observability: Hubble (CLI)
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
$ hubble observe --follow -l class=xwing
# ...
# Successful HTTPS request to www.disney.com
default/xwing:37836 (ID:16092) -> www.disney.com:443 (world) to-stack FORWARDED (TCP Flags: SYN)
www.disney.com:443 (world) -> default/xwing:37836 (ID:16092) to-endpoint FORWARDED (TCP Flags: SYN, ACK)
www.disney.com:443 (world) -> default/xwing:37836 (ID:16092) to-endpoint FORWARDED (TCP Flags: ACK, FIN)
default/xwing:37836 (ID:16092) -> www.disney.com:443 (world) to-stack FORWARDED (TCP Flags: RST)
# DNS lookup to coredns
default/xwing:41391 (ID:16092) -> kube-system/coredns-66bff467f8-28dgp:53 (ID:453) to-proxy FORWARDED (UDP)
kube-system/coredns-66bff467f8-28dgp:53 (ID:453) -> default/xwing:41391 (ID:16092) to-endpoint FORWARDED (UDP)
# ...
# Blocked HTTP request to deathstar backend
default/xwing:49610 (ID:16092) -> default/deathstar:80 (ID:16081) Policy denied DROPPED (TCP Flags: SYN)
Observability: Hubble (UI)
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
Observability: Cilium + Grafana ❤️
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
Observability: Network Metrics (Hubble)
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
Observability: HTTP Metrics (Hubble)
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
Observability: Network Policy Verdicts
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
Observability: TLS (Tetragon)
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
Observability: Combined Network & Runtime
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
#KCDFrance 2023
Networking
@raphink | @raphink@hachyderm.io
Networking
#KCDFrance 2023
Bypass native kernel network stack:
- eXpress Data Path (XDP)
- TCP improvements (bandwidth manager, BBR, Big TCP)
- NAT64/NAT46
- Performant load-balancing algorithms (Maglev)
- Network Policies
- Cluster Mesh
- Egress Gateway
- Sidecar-free service mesh
- etc.
@raphink | @raphink@hachyderm.io
Networking: XDP
#KCDFrance 2023
Drop packets before they reach the kernel
- E.g. packet of death, DDOS
- XDP allows to drop packets before
- they reach the kernel routing stack
@raphink | @raphink@hachyderm.io
Networking: XDP
#KCDFrance 2023
Drop packets before they reach the kernel
- E.g. packet of death, DDOS
- XDP allows to drop packets before
- they reach the kernel routing stack
Efficient Cloud Native LB
- E.g. Socket Load Balancer
@raphink | @raphink@hachyderm.io
Networking: IPtables vs eBPF
#KCDFrance 2023
kube-proxy / iptables
- Linear list / sieve
- All rules have to be replaced as a whole
eBPF based
- Per-CPU hash table ⇒ more performant
- Native metadata (e.g. Pod labels) ⇒
Cloud Native routing
🏆
@raphink | @raphink@hachyderm.io
Networking: BBR (TCP Congestion)
#KCDFrance 2023
@raphink | @raphink@hachyderm.io https://isovalent.com/blog/post/accelerate-network-performance-with-cilium-bbr/
Networking: NAT46/NAT64
#KCDFrance 2023
DNS64
NAT64
[64:ff9b::<z>] -> [<z>]
IPv6 Single Stack
K8s cluster
bar.com
A 4.3.2.1
DNS
bar.com
AAAA 64:ff9b::4.3.2.1
SYN 64:ff9b::4.3.2.1
IPv4 / Internet
SYN 4.3.2.1
ext. node
(Dual Stack)
@raphink | @raphink@hachyderm.io https://www.youtube.com/watch?v=Kvdh78TURck
Networking: Big TCP
#KCDFrance 2023
2.2x lower p99 latency
@raphink | @raphink@hachyderm.io https://www.youtube.com/watch?v=Kvdh78TURck
Networking: Sidecar-free Service Mesh
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
#KCDFrance 2023
Security
@raphink | @raphink@hachyderm.io
Security
#KCDFrance 2023
Observe and manipulate kernel events in real time
- Performant and transparent process visibility
- Metadata
- Fix kernel bugs on the fly
- Catch & kill
@raphink | @raphink@hachyderm.io
Security Visibility & Enforcement
#KCDFrance 2023
Traditional approaches
- App instrumentation / LD_PRELOAD ⇒ bypassed by statically linked executables
- ptrace(2) ⇒ TOCTTOU with syscalls
- Existing Kernel Runtime Enforcement ⇒ can benefit from BPF (BPF LSM with kernel 5.7+)
- Kernel module ⇒ stability & maintenance
@raphink | @raphink@hachyderm.io
Security Visibility & Enforcement with eBPF
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
Security: Catch & Kill
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
#KCDFrance 2023
The Future
@raphink | @raphink@hachyderm.io
To Infinity… and beyond 🚀
#KCDFrance 2023
- Improved device I/O perf with eBPF (XRP)
- Support for 100% of C (in a safe way)
- Cross-platform:
- archs
- compilers (LLVM/gcc)
- platforms (Linux, Windows, etc.)
- Towards a micro-kernel approach?
@raphink | @raphink@hachyderm.io
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
All major cloud providers have picked
-based Networking & Security
for their Kubernetes platforms
How about you?
eBPF resources
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
eCHO
eBPF YouTube podcast:
https://www.youtube.com/channel/UCJFUxkVQTBJh3LD1w
YBWvuQ
eBPF & Cilium Slack
http://slack.cilium.io/
eCHO News
Bi-weekly eBPF newsletter:
https://cilium.io/newsletter/
Workshops
#KCDFrance 2023
@raphink | @raphink@hachyderm.io
Paris
23 mai 2023
🌐 isovalent.com/workshop-tour
#KCDFrance 2023
Thanks

More Related Content

PPTX
Beyaz Şapkalı Hacker CEH Eğitimi - Bölüm 1, 2, 3
PPTX
Understanding kube proxy in ipvs mode
PDF
Cilium - Container Networking with BPF & XDP
PDF
Hping Kullanarak Ağ Keşif Çalışmaları
KEY
Django Celery
PPTX
Caching
PDF
Kablosuz Ağlar ve Güvenlik Riskleri
PDF
Cassandra Database
Beyaz Şapkalı Hacker CEH Eğitimi - Bölüm 1, 2, 3
Understanding kube proxy in ipvs mode
Cilium - Container Networking with BPF & XDP
Hping Kullanarak Ağ Keşif Çalışmaları
Django Celery
Caching
Kablosuz Ağlar ve Güvenlik Riskleri
Cassandra Database

What's hot (20)

PPT
7. Key-Value Databases: In Depth
PPTX
DNS Presentation
PPTX
An Overview of Apache Cassandra
PDF
Performance Wins with eBPF: Getting Started (2021)
PDF
Linux 4.x Tracing: Performance Analysis with bcc/BPF
PPTX
Tcpdump
PPTX
Transform your enterprise branch with secure sd-wan
PPTX
Operationalizing VRF in the Data Center
PPTX
Zenith Networks: Jump Start JUNOS
PDF
Empire Kurulumu ve Kullanımı
PDF
Understanding Data Partitioning and Replication in Apache Cassandra
PDF
Linux Performance Analysis: New Tools and Old Secrets
PPT
Schemaless Databases
PPTX
Attack detection and prevention in the cyber
PDF
Linux kernel tracing
PDF
Using ClickHouse for Experimentation
PDF
IP Addressing (Subnetting, VLSM, Supernetting)
PPTX
Linux networking
PDF
Pen-Testing with Metasploit
PDF
YOW2021 Computing Performance
7. Key-Value Databases: In Depth
DNS Presentation
An Overview of Apache Cassandra
Performance Wins with eBPF: Getting Started (2021)
Linux 4.x Tracing: Performance Analysis with bcc/BPF
Tcpdump
Transform your enterprise branch with secure sd-wan
Operationalizing VRF in the Data Center
Zenith Networks: Jump Start JUNOS
Empire Kurulumu ve Kullanımı
Understanding Data Partitioning and Replication in Apache Cassandra
Linux Performance Analysis: New Tools and Old Secrets
Schemaless Databases
Attack detection and prevention in the cyber
Linux kernel tracing
Using ClickHouse for Experimentation
IP Addressing (Subnetting, VLSM, Supernetting)
Linux networking
Pen-Testing with Metasploit
YOW2021 Computing Performance
Ad

Similar to Révolution eBPF - un noyau dynamique (17)

PPTX
Cfgmgmtcamp 2023 — eBPF Superpowers
PDF
DevOpsDays Zurich 2023 — Bridging Dev and Ops with eBPF: Extending Observabil...
PDF
KCD Zurich 2023 — Bridge Dev & Ops with eBPF.pdf
PDF
Low Overhead System Tracing with eBPF
PDF
The Automation Factory
PDF
ATO Linux Performance 2018
PDF
stackconf 2024 | Buzzing across the eBPF Landscape and into the Hive by Bill ...
PDF
Cilium: Kernel Native Security & DDOS Mitigation for Microservices with BPF
PDF
Cilium – Kernel Native Security & DDOS Mitigation for Microservices with BPF
PDF
Introduction of eBPF - 時下最夯的Linux Technology
PDF
Linux Native, HTTP Aware Network Security
PDF
XDP in Practice: DDoS Mitigation @Cloudflare
PDF
Enhancing Network and Runtime Security with Cilium and Tetragon by Raymond De...
PDF
Security Monitoring with eBPF
PDF
Linux Kernel vs DPDK: HTTP Performance Showdown
PDF
ebpf and IO Visor: The What, how, and what next!
PDF
Efficient System Monitoring in Cloud Native Environments
Cfgmgmtcamp 2023 — eBPF Superpowers
DevOpsDays Zurich 2023 — Bridging Dev and Ops with eBPF: Extending Observabil...
KCD Zurich 2023 — Bridge Dev & Ops with eBPF.pdf
Low Overhead System Tracing with eBPF
The Automation Factory
ATO Linux Performance 2018
stackconf 2024 | Buzzing across the eBPF Landscape and into the Hive by Bill ...
Cilium: Kernel Native Security & DDOS Mitigation for Microservices with BPF
Cilium – Kernel Native Security & DDOS Mitigation for Microservices with BPF
Introduction of eBPF - 時下最夯的Linux Technology
Linux Native, HTTP Aware Network Security
XDP in Practice: DDoS Mitigation @Cloudflare
Enhancing Network and Runtime Security with Cilium and Tetragon by Raymond De...
Security Monitoring with eBPF
Linux Kernel vs DPDK: HTTP Performance Showdown
ebpf and IO Visor: The What, how, and what next!
Efficient System Monitoring in Cloud Native Environments
Ad

More from Raphaël PINSON (20)

PDF
Explore the World of Cilium, Tetragon & eBPF
PDF
Cfgmgmtcamp 2024 — eBPF-based Security Observability & Runtime Enforcement wi...
PDF
ContainerDays Hamburg 2023 — Cilium Workshop.pdf
PDF
Cloud Native Bern 05.2023 — Zero Trust Visibility
PDF
Cloud Native Networking & Security with Cilium & eBPF
PDF
2022 DevOpsDays Geneva — The Hare and the Tortoise.pdf
PDF
SKS in git ops mode
PDF
The Hare and the Tortoise: Open Source, Standards & Technological Debt
PDF
Devops stack
PDF
YAML Engineering: why we need a new paradigm
PDF
Container Security: a toolchain for automatic image rebuilds
PDF
K9s - Kubernetes CLI To Manage Your Clusters In Style
PDF
Argocd up and running
PDF
Bivac - Container Volumes Backup
PDF
Automating Puppet Certificates Renewal
PDF
Running the Puppet Stack in Containers
PDF
Automating Puppet Certificates Renewal
PDF
Narcissus — mapping configs in Go
ODP
FTTH Factory — an illustration of the "Everything as Code" paradigm
PDF
Puppet Test Driven Development with Travis CI and Docker
Explore the World of Cilium, Tetragon & eBPF
Cfgmgmtcamp 2024 — eBPF-based Security Observability & Runtime Enforcement wi...
ContainerDays Hamburg 2023 — Cilium Workshop.pdf
Cloud Native Bern 05.2023 — Zero Trust Visibility
Cloud Native Networking & Security with Cilium & eBPF
2022 DevOpsDays Geneva — The Hare and the Tortoise.pdf
SKS in git ops mode
The Hare and the Tortoise: Open Source, Standards & Technological Debt
Devops stack
YAML Engineering: why we need a new paradigm
Container Security: a toolchain for automatic image rebuilds
K9s - Kubernetes CLI To Manage Your Clusters In Style
Argocd up and running
Bivac - Container Volumes Backup
Automating Puppet Certificates Renewal
Running the Puppet Stack in Containers
Automating Puppet Certificates Renewal
Narcissus — mapping configs in Go
FTTH Factory — an illustration of the "Everything as Code" paradigm
Puppet Test Driven Development with Travis CI and Docker

Recently uploaded (20)

DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Big Data Technologies - Introduction.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Machine Learning_overview_presentation.pptx
PPTX
Cloud computing and distributed systems.
PDF
Machine learning based COVID-19 study performance prediction
The AUB Centre for AI in Media Proposal.docx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Digital-Transformation-Roadmap-for-Companies.pptx
20250228 LYD VKU AI Blended-Learning.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
A comparative analysis of optical character recognition models for extracting...
Network Security Unit 5.pdf for BCA BBA.
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Programs and apps: productivity, graphics, security and other tools
Diabetes mellitus diagnosis method based random forest with bat algorithm
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Big Data Technologies - Introduction.pptx
A Presentation on Artificial Intelligence
Unlocking AI with Model Context Protocol (MCP)
Per capita expenditure prediction using model stacking based on satellite ima...
MIND Revenue Release Quarter 2 2025 Press Release
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Machine Learning_overview_presentation.pptx
Cloud computing and distributed systems.
Machine learning based COVID-19 study performance prediction

Révolution eBPF - un noyau dynamique

  • 1. Révolution eBPF Un noyau Linux dynamique Speaker : Raphaël Pinson, @raphink | @raphink@hachyderm.io #KCDFrance 2023
  • 2. ⬢ What is eBPF? #KCDFrance 2023 Agenda @raphink | @raphink@hachyderm.io
  • 3. ⬢ What is eBPF? ⬢ Principles #KCDFrance 2023 Agenda @raphink | @raphink@hachyderm.io
  • 4. ⬢ What is eBPF? ⬢ Principles ⬢ Observability #KCDFrance 2023 Agenda @raphink | @raphink@hachyderm.io
  • 5. ⬢ What is eBPF? ⬢ Principles ⬢ Observability ⬢ Networking #KCDFrance 2023 Agenda @raphink | @raphink@hachyderm.io
  • 6. ⬢ What is eBPF? ⬢ Principles ⬢ Observability ⬢ Networking ⬢ Security #KCDFrance 2023 Agenda @raphink | @raphink@hachyderm.io
  • 7. ⬢ What is eBPF? ⬢ Principles ⬢ Observability ⬢ Networking ⬢ Security ⬢ The Future #KCDFrance 2023 Agenda @raphink | @raphink@hachyderm.io
  • 8. The Linux Kernel #KCDFrance 2023 The Power Behind Modern Technology - From cars to servers to fridges - Foundation of the GNU/Linux operating system - Most widely used operating system in the world - Powers the vast majority of: - embedded systems / IoT - Cloud Server - Super Computers @raphink | @raphink@hachyderm.io
  • 9. Before #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 10. With #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 11. Have you used eBPF? #KCDFrance 2023 eBPF is already used in many places - Load balancing - DDOS protection on large Internet platforms - Kernel live-patching (5.7+ with LSM/eBPF) - Android (e.g. app data stats) @raphink | @raphink@hachyderm.io
  • 12. Who am I #KCDFrance 2023 Raphaël Pinson Solutions Architect @ Isovalent @raphink | @raphink@hachyderm.io
  • 13. #KCDFrance 2023 What is eBPF? @raphink | @raphink@hachyderm.io
  • 14. #KCDFrance 2023 Makes the Linux kernel programmable in a secure and efficient way. “What JavaScript is to the browser, eBPF is to the Linux Kernel” @raphink | @raphink@hachyderm.io
  • 15. #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 16. #KCDFrance 2023 Principles @raphink | @raphink@hachyderm.io
  • 17. How does it work? #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 18. How does it work? #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 19. How does it work? #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 20. How does it work? #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 21. How does it work? #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 22. How does it work? #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 23. How does it work? #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 24. How does it work? #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 25. eBPF Helpers #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 26. Stacks & hooks #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 27. BPF / user-space communication #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 32. Safety #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 33. Performance #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 34. Cloud Native Identities #KCDFrance 2023 eBPF “understands” Cloud Native identities: - in kernel observability - in network traffic - in kernel security @raphink | @raphink@hachyderm.io
  • 35. eBPF Projects and SDKs #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 36. Cilium & Friends #KCDFrance 2023 - performance gains (no need for iptables, bypass TCP/IP) - simpler architecture (e.g. no sidecar proxy for Service Mesh) Cilium @raphink | @raphink@hachyderm.io
  • 37. Cilium & Friends #KCDFrance 2023 - performance gains (no need for iptables, bypass TCP/IP) - simpler architecture (e.g. no sidecar proxy for Service Mesh) Cilium Hubble - fine-grained network observability - exports to SIEM - support for OpenTelemetry @raphink | @raphink@hachyderm.io
  • 38. Cilium & Friends #KCDFrance 2023 - performance gains (no need for iptables, bypass TCP/IP) - simpler architecture (e.g. no sidecar proxy for Service Mesh) Cilium Hubble - fine-grained network observability - exports to SIEM - support for OpenTelemetry Tetragon - observe & export kernel events - act on events (e.g. SIGKILL) @raphink | @raphink@hachyderm.io
  • 40. Observability #KCDFrance 2023 Observe directly in the kernel - Low-overhead tracing/observability - Example: network performance / SRTT / micro-bursts - HTTP / TLS in-kernel visibility - Troubleshooting prod on the fly (see bpftrace) @raphink | @raphink@hachyderm.io
  • 41. Observability #KCDFrance 2023 Observe directly in the kernel - Low-overhead tracing/observability - Example: network performance / SRTT / micro-bursts - HTTP / TLS in-kernel visibility - Troubleshooting prod on the fly (see bpftrace) Example software - BCC - bpftrace - Cilium (network) - Cilium Tetragon (system) @raphink | @raphink@hachyderm.io
  • 43. $ kubectl get pods NAME READY STATUS RESTARTS AGE tiefighter 1/1 Running 0 2m34s xwing 1/1 Running 0 2m34s deathstar-5b7489bc84-crlxh 1/1 Running 0 2m34s deathstar-5b7489bc84-j7qwq 1/1 Running 0 2m34s Observability: Hubble (CLI) #KCDFrance 2023 @raphink | @raphink@hachyderm.io $ hubble observe --follow -l class=xwing # ... # Successful HTTPS request to www.disney.com default/xwing:37836 (ID:16092) -> www.disney.com:443 (world) to-stack FORWARDED (TCP Flags: SYN) www.disney.com:443 (world) -> default/xwing:37836 (ID:16092) to-endpoint FORWARDED (TCP Flags: SYN, ACK) www.disney.com:443 (world) -> default/xwing:37836 (ID:16092) to-endpoint FORWARDED (TCP Flags: ACK, FIN) default/xwing:37836 (ID:16092) -> www.disney.com:443 (world) to-stack FORWARDED (TCP Flags: RST) # DNS lookup to coredns default/xwing:41391 (ID:16092) -> kube-system/coredns-66bff467f8-28dgp:53 (ID:453) to-proxy FORWARDED (UDP) kube-system/coredns-66bff467f8-28dgp:53 (ID:453) -> default/xwing:41391 (ID:16092) to-endpoint FORWARDED (UDP) # ... # Blocked HTTP request to deathstar backend default/xwing:49610 (ID:16092) -> default/deathstar:80 (ID:16081) Policy denied DROPPED (TCP Flags: SYN)
  • 44. Observability: Hubble (UI) #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 45. Observability: Cilium + Grafana ❤️ #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 46. Observability: Network Metrics (Hubble) #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 47. Observability: HTTP Metrics (Hubble) #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 48. Observability: Network Policy Verdicts #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 49. Observability: TLS (Tetragon) #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 50. Observability: Combined Network & Runtime #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 51. #KCDFrance 2023 Networking @raphink | @raphink@hachyderm.io
  • 52. Networking #KCDFrance 2023 Bypass native kernel network stack: - eXpress Data Path (XDP) - TCP improvements (bandwidth manager, BBR, Big TCP) - NAT64/NAT46 - Performant load-balancing algorithms (Maglev) - Network Policies - Cluster Mesh - Egress Gateway - Sidecar-free service mesh - etc. @raphink | @raphink@hachyderm.io
  • 53. Networking: XDP #KCDFrance 2023 Drop packets before they reach the kernel - E.g. packet of death, DDOS - XDP allows to drop packets before - they reach the kernel routing stack @raphink | @raphink@hachyderm.io
  • 54. Networking: XDP #KCDFrance 2023 Drop packets before they reach the kernel - E.g. packet of death, DDOS - XDP allows to drop packets before - they reach the kernel routing stack Efficient Cloud Native LB - E.g. Socket Load Balancer @raphink | @raphink@hachyderm.io
  • 55. Networking: IPtables vs eBPF #KCDFrance 2023 kube-proxy / iptables - Linear list / sieve - All rules have to be replaced as a whole eBPF based - Per-CPU hash table ⇒ more performant - Native metadata (e.g. Pod labels) ⇒ Cloud Native routing 🏆 @raphink | @raphink@hachyderm.io
  • 56. Networking: BBR (TCP Congestion) #KCDFrance 2023 @raphink | @raphink@hachyderm.io https://isovalent.com/blog/post/accelerate-network-performance-with-cilium-bbr/
  • 57. Networking: NAT46/NAT64 #KCDFrance 2023 DNS64 NAT64 [64:ff9b::<z>] -> [<z>] IPv6 Single Stack K8s cluster bar.com A 4.3.2.1 DNS bar.com AAAA 64:ff9b::4.3.2.1 SYN 64:ff9b::4.3.2.1 IPv4 / Internet SYN 4.3.2.1 ext. node (Dual Stack) @raphink | @raphink@hachyderm.io https://www.youtube.com/watch?v=Kvdh78TURck
  • 58. Networking: Big TCP #KCDFrance 2023 2.2x lower p99 latency @raphink | @raphink@hachyderm.io https://www.youtube.com/watch?v=Kvdh78TURck
  • 59. Networking: Sidecar-free Service Mesh #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 60. #KCDFrance 2023 Security @raphink | @raphink@hachyderm.io
  • 61. Security #KCDFrance 2023 Observe and manipulate kernel events in real time - Performant and transparent process visibility - Metadata - Fix kernel bugs on the fly - Catch & kill @raphink | @raphink@hachyderm.io
  • 62. Security Visibility & Enforcement #KCDFrance 2023 Traditional approaches - App instrumentation / LD_PRELOAD ⇒ bypassed by statically linked executables - ptrace(2) ⇒ TOCTTOU with syscalls - Existing Kernel Runtime Enforcement ⇒ can benefit from BPF (BPF LSM with kernel 5.7+) - Kernel module ⇒ stability & maintenance @raphink | @raphink@hachyderm.io
  • 63. Security Visibility & Enforcement with eBPF #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 64. Security: Catch & Kill #KCDFrance 2023 @raphink | @raphink@hachyderm.io
  • 65. #KCDFrance 2023 The Future @raphink | @raphink@hachyderm.io
  • 66. To Infinity… and beyond 🚀 #KCDFrance 2023 - Improved device I/O perf with eBPF (XRP) - Support for 100% of C (in a safe way) - Cross-platform: - archs - compilers (LLVM/gcc) - platforms (Linux, Windows, etc.) - Towards a micro-kernel approach? @raphink | @raphink@hachyderm.io
  • 67. #KCDFrance 2023 @raphink | @raphink@hachyderm.io All major cloud providers have picked -based Networking & Security for their Kubernetes platforms How about you?
  • 68. eBPF resources #KCDFrance 2023 @raphink | @raphink@hachyderm.io eCHO eBPF YouTube podcast: https://www.youtube.com/channel/UCJFUxkVQTBJh3LD1w YBWvuQ eBPF & Cilium Slack http://slack.cilium.io/ eCHO News Bi-weekly eBPF newsletter: https://cilium.io/newsletter/
  • 69. Workshops #KCDFrance 2023 @raphink | @raphink@hachyderm.io Paris 23 mai 2023 🌐 isovalent.com/workshop-tour