Cilium — eBPF-Powered Cloud Native Networking & Security
Cilium provides high-performance networking, observability, and security for Kubernetes using eBPF. CNI plugin, service mesh, and network policy — all kernel-level.
先审查再安装
这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。
npx -y tokrepo@latest install 30500e42-3535-11f1-9bc6-00163e2b0d79 --target codex先 dry-run,确认写入项后再运行此命令。
What it is
Cilium is an open-source cloud-native networking, observability, and security platform powered by eBPF (extended Berkeley Packet Filter). As a CNCF graduated project, it operates at the Linux kernel level to implement CNI, service mesh, and network policies without the overhead of traditional iptables-based solutions.
Cilium is designed for platform engineers and Kubernetes operators who need high-performance pod networking with deep L3-L7 visibility and policy enforcement.
How it saves time or tokens
Cilium replaces multiple separate tools. Instead of running a CNI plugin plus Istio for service mesh plus a separate network policy engine, Cilium handles all three in one eBPF-powered stack. The sidecar-free service mesh approach eliminates per-pod proxy overhead, reducing both resource consumption and operational complexity.
How to use
- Install the Cilium CLI:
brew install cilium-cli
- Install Cilium in your Kubernetes cluster:
cilium install
cilium status --wait
- Verify connectivity:
cilium connectivity test
Example
# L7 network policy: allow only GET requests to /api/v1/public
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: allow-public-api
spec:
endpointSelector:
matchLabels:
app: backend
ingress:
- fromEndpoints:
- matchLabels:
app: frontend
toPorts:
- ports:
- port: '8080'
protocol: TCP
rules:
http:
- method: GET
path: '/api/v1/public'
Related on TokRepo
- DevOps tools — infrastructure and Kubernetes tooling
- Security tools — network security and policy enforcement resources
Common pitfalls
- Running Cilium on kernels older than 4.19 where eBPF features are incomplete
- Forgetting to remove the existing CNI plugin before installing Cilium, causing conflicts
- Enabling Hubble observability without allocating sufficient resources for the Hubble Relay component
常见问题
eBPF (extended Berkeley Packet Filter) lets programs run inside the Linux kernel without modifying kernel source code. Cilium uses eBPF to intercept and filter network packets at the kernel level, achieving higher performance than user-space proxies or iptables rules.
Cilium provides a sidecar-free service mesh using eBPF, while Istio injects an Envoy sidecar proxy into each pod. Cilium has lower resource overhead and simpler operations. Istio offers more mature traffic management features like circuit breaking and fault injection.
Yes. Cilium can fully replace kube-proxy for Kubernetes service load balancing using eBPF. This removes the iptables dependency and improves performance at scale with large numbers of services.
Hubble is the observability layer built on top of Cilium. It provides real-time network flow visibility, DNS monitoring, HTTP request tracing, and service dependency maps. Hubble UI offers a graphical interface for exploring network flows.
Yes. Cilium Cluster Mesh connects multiple Kubernetes clusters with pod-to-pod connectivity, shared services, and unified network policies across clusters without requiring a VPN or overlay between clusters.
引用来源 (3)
- Cilium GitHub Repository— Cilium is a CNCF graduated project
- Cilium Documentation— eBPF-based networking and security
- eBPF.io— eBPF technology overview
讨论
相关资产
Calico — Kubernetes Networking and Network Security
A high-performance networking and network policy engine for Kubernetes that provides pod networking, network policy enforcement, and optional eBPF data plane for zero-overhead observability.
Falco — Cloud Native Runtime Security & Threat Detection
Falco is an open-source runtime security tool that detects abnormal activity in containers and hosts using eBPF and syscalls. Real-time threat detection for Kubernetes.
Tetragon — eBPF-Based Security Observability for Kubernetes
Tetragon provides real-time security observability and runtime enforcement using eBPF, giving deep visibility into process, file, and network activity in Kubernetes.
Tracee — eBPF Runtime Security and Forensics for Linux
Tracee by Aqua Security uses eBPF to trace system events at the OS level, detecting suspicious behavior in containers and hosts for runtime security and forensics.