Skills2026年4月10日·1 分钟阅读

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 就绪

先审查再安装

这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。

Needs Confirmation · 64/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
step-1.md
先审查命令
npx -y tokrepo@latest install 30500e42-3535-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run,确认写入项后再运行此命令。

TL;DR
Cilium uses eBPF to deliver high-performance Kubernetes networking, observability, and security at the kernel level.
§01

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.

§02

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.

§03

How to use

  1. Install the Cilium CLI:
brew install cilium-cli
  1. Install Cilium in your Kubernetes cluster:
cilium install
cilium status --wait
  1. Verify connectivity:
cilium connectivity test
§04

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'
§05

Related on TokRepo

§06

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

常见问题

What is eBPF and why does Cilium use it?+

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.

How does Cilium compare to Istio?+

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.

Can Cilium replace kube-proxy?+

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.

What is Hubble in the Cilium ecosystem?+

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.

Does Cilium support multi-cluster networking?+

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)

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产