Cilium — CNI plugin based on eBPF, replacing iptables/kube-proxy.
eBPF advantages:
Installation:
1helm repo add cilium https://helm.cilium.io/2helm install cilium cilium/cilium \3 --namespace kube-system \4 --set kubeProxyReplacement=true \5 --set hubble.enabled=true \6 --set hubble.relay.enabled=true \7 --set hubble.ui.enabled=true
L7 NetworkPolicy:
1apiVersion: cilium.io/v22kind: CiliumNetworkPolicy3metadata:4 name: api-policy5spec:6 endpointSelector:7 matchLabels:8 app: api9 ingress:10 - fromEndpoints:11 - matchLabels:12 app: frontend13 toPorts:14 - ports:15 - port: "8080"16 protocol: TCP17 rules:18 http:19 - method: GET20 path: "/api/v1/.*"21 - method: POST22 path: "/api/v1/orders"23 headers:24 - "Content-Type: application/json"
Hubble (observability):
1# Network flow2hubble observe --namespace production3hubble observe --to-pod production/api4hubble observe --protocol http56# Policy verdicts7hubble observe --type verdict
CiliumService (replacement for kube-proxy): Faster for large clusters (10k+ services).