🐝
Container Platform

Cilium

eBPF-powered networking, security, and observability for Kubernetes

🐧 Linux🍎 Mac🪟 Windows
Reviewed: Tested on: Kubernetes 1.29 · Terraform 1.8 · Ubuntu 22.04

What is this?

Cilium uses eBPF for fast networking, security policies, and observability in Kubernetes.

📥

Step 01

Install Cilium

(01)Install Cilium

Linux
1CILIUM_CLI_VERSION=$(curl -s https://raw.githubusercontent.com/cilium/cilium-cli/main/stable.txt)
2curl -L --fail https://github.com/cilium/cilium-cli/releases/download/${CILIUM_CLI_VERSION}/cilium-linux-amd64.tar.gz | tar xz
3sudo mv cilium /usr/local/bin/
4cilium install
⚙️

Step 02

Configure Cilium

(01)Configure Cilium

Linux
1cilium status --wait
2kubectl -n kube-system get pods -l k8s-app=cilium
3# Enable Hubble observability:
4cilium hubble enable
5cilium hubble ui

Step 03

Verify

(01)Verify installation

Linux
1cilium connectivity test
2cilium hubble observe
🔧

Step 04

Common Problems

#1Pods have no network connectivity

Linux
1cilium status
2kubectl -n kube-system logs -l k8s-app=cilium --tail=50
3cilium connectivity test

📋Config templates

2 YAML templates for Cilium. Copy and deploy after setup.

2 ready-to-copy templates. Expand one, copy the YAML, then run the deploy commands.

Ingress.yml

yaml
1apiVersion: networking.k8s.io/v1
2kind: Ingress
3metadata:
4 name: minimal-ingress
5 annotations:
6 nginx.ingress.kubernetes.io/rewrite-target: /
7spec:
8 rules:
9 - http:
10 paths:
11 - path: /testpath
12 pathType: Prefix
13 backend:
14 service:
15 name: test
16 port:
17 number: 80
📄

Step 01

Deploy Ingress

(01)Install NGINX Ingress Controller

Linux
1kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.11.1/deploy/static/provider/cloud/deploy.yaml
2kubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=120s

(02)Apply Ingress resource

Linux
1kubectl apply -f Ingress.yml
2kubectl get ingress
3kubectl describe ingress minimal-ingress