These are my personal study notes and architecture guides compiled while preparing for and passing the Cilium Certified Associate (CCA) certification by the Cloud Native Computing Foundation (CNCF) and The Linux Foundation.

As Kubernetes networking evolves past legacy iptables and IPVS bottlenecks, eBPF (Extended Berkeley Packet Filter) has become the revolutionary standard for container networking, security observability, and service meshes. I documented all hands-on labs, manifests, and exam takeaways in my GitHub Cilium Certified Associate Repository to serve as a high-yield, comprehensive exam guide.

20%
Architecture & IPAM
18%
Network Policies
16%
Gateway API & Mesh
18%
Hubble Observability
12%
Cluster Mesh
10%
BGP & Egress Gateway
6%
Runtime Security

1. eBPF Fundamentals & Cilium CNI Architecture (20%)

eBPF allows sandboxed programs to execute directly within the Linux kernel in response to kernel events (tracepoints, kprobes, network sockets, tc filters). This completely bypasses the user-space/kernel-space context switching overhead and eliminates the massive iptables lookup loops that plague large Kubernetes clusters.

eBPF Structure: Programs & Maps

An eBPF application consists of two distinct components:

The Swiss Army Knife: bpftool

On any node running Cilium, you can inspect active in-kernel programs and maps directly:
bpftool prog list — Lists all loaded BPF programs, IDs, and attached hook points.
bpftool map list — Lists active BPF maps storing endpoint routes, NAT tables, and metrics.

CNI Plugin Lifecycle on Nodes

When Cilium is deployed on a Kubernetes node:

  1. The Cilium agent writes /etc/cni/net.d/05-cilium.conflist instructing Kubelet how to configure Pod networking.
  2. It adds the /opt/cni/bin/cilium-cni binary (acting as a wrapper between Kubelet and the local cilium-agent daemon).
  3. ADD Command: Kubelet calls cilium-cni on Pod creation to setup veth pairs, assign Pod IPs, and inject eBPF datapath hooks.
  4. DEL Command: Triggered on Pod deletion to clean up BPF maps and release IP addresses.

Cilium IPAM Modes Breakdown

IPAM Mode How It Works Default / Flag Use Case
Cluster Scope (cluster-pool) The Cilium Operator manages CIDRs and assigns a subnet (e.g. /24 via cluster-pool-ipv4-mask-size) to each CiliumNode CRD. Default
ipam.mode=cluster-pool
Standard bare-metal, Kind, and self-hosted clusters.
Kubernetes Host Scope Relies on kube-controller-manager with --allocate-node-cidrs to set spec.podCIDR on native Node objects. Optional
ipam.mode=kubernetes
Standard K8s clusters, GKE default.
Multi-Pool IPAM Allows dynamically provisioning multiple CiliumPodIPPool CRDs. Pods select pools via ipam.cilium.io/ip-pool annotations. (Requires Direct Native Routing). Advanced
ipam.mode=multi-pool
Multi-tenant clusters, segregated subnets for different workload tiers.
CRD-Backed (AWS ENI / Azure IPAM) Cilium Operator talks directly to AWS/Azure APIs to allocate secondary private IPs per node directly on cloud NICs. Cloud Native
ipam.mode=eni / azure
Direct VPC/VNet pod routability without overlay encapsulation.

2. Layer 3/4 vs Layer 7 Cilium Network Policies (18%)

Standard Kubernetes NetworkPolicy resources can only filter traffic at Layer 3 (IPs/CIDRs) and Layer 4 (TCP/UDP Ports). They cannot inspect HTTP paths, methods, headers, or gRPC services.

Two-Tier Enforcement Architecture

Cilium implements Layer 7 security policies using an intelligent two-tier architecture:

  1. Tier 1 (Kernel eBPF): Evaluates L3/L4 rules directly in the kernel datapath with zero context-switch penalty. Non-matching packets are immediately DROPPED.
  2. Tier 2 (On-Node Envoy Proxy): If the packet passes L3/L4 filters, it is forwarded transparently to the co-located Envoy proxy running on the node to enforce HTTP/gRPC rules. If denied at L7, Envoy returns an application-level response (e.g. HTTP 403 Forbidden).
l7-cilium-network-policy.yaml
apiVersion: "cilium.io/v2"
kind: CiliumNetworkPolicy
metadata:
  name: "secure-deathstar-landing"
  namespace: "default"
spec:
  description: "Allow only authenticated landing requests to /v1/request-landing"
  endpointSelector:
    matchLabels:
      org: empire
      class: deathstar
  ingress:
    - fromEndpoints:
        - matchLabels:
            org: empire
      toPorts:
        - ports:
            - port: "80"
              protocol: TCP
          rules:
            http:
              - method: "POST"
                path: "/v1/request-landing"

Clusterwide vs Namespaced Policies

3. Gateway API, Ingress & GAMMA Service Mesh (16%)

Kubernetes Ingress was designed around HTTP routing annotations and lacked standard support for TCP/UDP, traffic splitting, header mutations, and cross-namespace governance. The Gateway API replaces Ingress with an expressive, role-oriented standard.

The Role-Oriented Architecture Hierarchy

advanced-httproute-features.yaml
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: canary-and-header-manipulation
  namespace: prod
spec:
  parentRefs:
    - name: cilium-gw
  rules:
    # 1. Traffic Splitting (Canary / Blue-Green)
    - matches:
        - path:
            type: PathPrefix
            value: /api/v2
      backendRefs:
        - name: app-v1
          port: 8080
          weight: 80
        - name: app-v2
          port: 8080
          weight: 20
    # 2. Header Modification & URL Path Rewriting
    - matches:
        - path:
            type: PathPrefix
            value: /old-prefix
      filters:
        - type: URLRewrite
          urlRewrite:
            path:
              type: ReplacePrefixMatch
              replacePrefixMatch: /new-prefix
        - type: RequestHeaderModifier
          requestHeaderModifier:
            add:
              - name: X-Cilium-Engine
                value: "eBPF-Envoy"
      backendRefs:
        - name: backend-service
          port: 8080

East-West Service Mesh with GAMMA

The GAMMA (Gateway API for Mesh Management and Administration) initiative enables Layer 7 routing between internal microservices (East-West) without sidecars. Instead of attaching an HTTPRoute to a Gateway, you attach it to a Kubernetes Service:

gamma-east-west-service-mesh.yaml
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: internal-echo-split
  namespace: default
spec:
  parentRefs:
    - group: ""
      kind: Service
      name: echo-service
  rules:
    - matches:
        - path:
            type: Exact
            value: /v2
      backendRefs:
        - name: echo-v2
          port: 80

4. Network Observability with Hubble (18%)

Hubble is Cilium's built-in observability engine. By tapping directly into eBPF hooks in the Linux kernel, Hubble provides real-time visibility into network flows, DNS resolutions, HTTP transactions, and packet drop reasons without modifying application code.

Essential Hubble CLI Commands

hubble-cli-commands.sh
# Enable Hubble with Web UI in the cluster
cilium hubble enable --ui

# Open port-forward to local Hubble Relay
cilium hubble port-forward &

# Observe real-time traffic from a specific pod
hubble observe --from-pod default/frontend

# Filter dropped packets to diagnose Network Policy denials
hubble observe --verdict DROPPED --namespace default

# Observe Layer 7 HTTP flows with status codes
hubble observe --protocol http --http-status 500

# Inspect raw IP addresses without pod name translation
hubble observe --ip-translation=false --protocol tcp

5. Cilium Cluster Mesh & Multi-Cluster (12%)

Cilium Cluster Mesh connects multiple independent Kubernetes clusters into a unified service mesh. It synchronizes cluster state through an etcd key-value store, allowing Pods across different clusters to communicate directly over native IP routing or overlay tunnels without intermediate ingress gateways.

Global Services & Traffic Affinity

To turn a standard Kubernetes Service into a multi-cluster service, simply add the service.cilium.io/global: "true" annotation:

global-resilient-service.yaml
apiVersion: v1
kind: Service
metadata:
  name: payment-backend
  annotations:
    service.cilium.io/global: "true"
    service.cilium.io/affinity: "local"
spec:
  type: ClusterIP
  ports:
    - port: 8080
  selector:
    app: payment-backend

6. BGP Control Plane & Egress Gateways (10%)

Native BGP Control Plane

In modern leaf-spine enterprise data centers, Kubernetes nodes peer directly with Top-of-Rack (ToR) physical switches via BGP to advertise Pod CIDRs and LoadBalancer IPs. This eliminates overlay encapsulation (Geneve/VXLAN) and enables wire-speed routing.

Cilium's BGP v2 control plane is managed using three declarative CRDs:

  1. CiliumBGPClusterConfig: Selects target nodes and configures local Autonomous System Numbers (ASN).
  2. CiliumBGPPeerConfig: Configures remote neighbor peering IP addresses and timers.
  3. CiliumBGPAdvertisement: Defines which CIDRs (Pod CIDRs or Service LoadBalancer IPs) are announced via BGP.

Egress Gateway (Predictable Outbound NAT)

Enterprise firewalls outside Kubernetes require static, predictable source IP addresses to allow traffic into legacy databases or partner APIs. Cilium's Egress Gateway intercepts outbound traffic from matching pods and routes it through designated gateway nodes performing Source NAT (SNAT) with dedicated IPs:

cilium-egress-gateway-policy.yaml
apiVersion: cilium.io/v2
kind: CiliumEgressGatewayPolicy
metadata:
  name: egress-to-oracle-db
spec:
  destinationCIDRs:
    - "192.168.10.0/24"
  selectors:
    - podSelector:
        matchLabels:
          app: payment-processor
  egressGateway:
    nodeSelector:
      matchLabels:
        node-role.kubernetes.io/egress-gateway: "true"
    interface: eth1

7. Runtime Security & Enforcement with Tetragon (6%)

Tetragon is Cilium's eBPF-based security observability and runtime enforcement engine. Unlike traditional security tools that analyze audit logs in user-space after an attack occurred, Tetragon hooks directly into kernel system calls and kprobes to detect and block threats in real time.

In-Kernel Enforcement with TracingPolicy

Tetragon operates via TracingPolicy CRDs. When an attacker attempts a container breakout (e.g. running nsenter to escape user namespaces or writing unauthorized static pods into /etc/kubernetes/manifests), Tetragon detects the event and can enforce in-kernel actions:

block-manifest-tampering.yaml
apiVersion: cilium.io/v1alpha1
kind: TracingPolicy
metadata:
  name: block-manifest-tampering
spec:
  kprobes:
    - call: "security_file_permission"
      syscall: false
      args:
        - index: 0
          type: "file"
        - index: 1
          type: "int"
      selectors:
        - matchArgs:
            - index: 0
              operator: "Prefix"
              values:
                - "/etc/kubernetes/manifests"
          matchActions:
            - action: Override
              argError: -1

8 Critical CCA Exam Gotchas

  • eBPF Capabilities: eBPF programs do not always require CAP_SYS_ADMIN in modern kernels; unprivileged and specialized capabilities (like CAP_BPF and CAP_NET_ADMIN) exist.
  • Gateway API Prerequisites: Cilium Gateway API requires kubeProxyReplacement="true" and CRD installation prior to helm deployment.
  • L3/L4 vs L7 Actions: eBPF drops packets silently at L3/L4 in kernel space. L7 rules evaluated by Envoy return standard HTTP status codes (403 Forbidden).
  • Cluster Mesh IDs: Every meshed cluster must have a unique cluster.id and distinct IP ranges.
  • Global Service Annotations: Marking a service global on one cluster is not enough; the annotation must exist on all participating clusters in the mesh.
  • Tetragon Independence: Tetragon does not require Cilium CNI or Hubble to function; it can run standalone on any Kubernetes cluster.
  • Hubble Drop Inspection: Use hubble observe --verdict DROPPED to isolate network policy drops in real time.
  • Egress Gateway NAT: Egress Gateway performs Source NAT (SNAT), never Destination NAT (DNAT).

The CCA certification is a fantastic benchmark for modern cloud-native architects looking to master eBPF networking, security enforcement, and high-performance routing in Kubernetes.

You can find all practical lab scripts, YAML manifests, and exam quizzes in my open-source repository: github.com/muecahit94/cilium-certified-associate.

Best of luck with your Cilium certification journey!