RousselTMLEARNING

TP · Observability with eBPF: from discovery to expertise

Lab: Kubernetes network flows with Cilium and Hubble

What you will learn in this TP
  • Install Cilium and Hubble
  • Observe the flows
  • Troubleshoot a drop
Mode :

All steps and instructions are shown. Recommended for this lab: autonomous

Introduction #

Context. After a NetworkPolicy was deployed, the front end can no longer reach the API and nobody understands why. You make the cluster network observable.

Prerequisites: kind, kubectl, cilium and hubble CLIs  ·  Estimated time: 50 min

See every flow and every drop in the cluster.

Hands-on #

Guided steps, with their solutions.

  1. 1. Create the cluster without a CNI

    Why? Cilium replaces kind's default CNI.

    Create a kind cluster with disableDefaultCNI: true and install Cilium.
  2. 2. Enable Hubble

    Why? Relay aggregates the flows from every node for the CLI and the UI.

    Enable Hubble with the UI and open the tunnel to Relay.
  3. 3. Deploy an application

    Why? Two services talking to each other are enough to produce interesting flows.

    Deploy an api server and a front client that queries it in a loop, then observe the flows.
  4. 4. Break it with a NetworkPolicy

    Why? You reproduce the incident: a policy that only allows role=frontend pods.

    Apply the policy, then look for the dropped flows.
  5. 5. Fix and visualise

    Why? The fix can be verified immediately in the flows.

    Add the expected label to the pod, check that the flows are FORWARDED again, then open the Hubble UI.
  6. 6. Clean up

    Why? Free up resources.

    Delete the cluster.

Validate your work

Check that each goal above is reached and that you get the result described in the introduction.

Difficulty level : ●●●●○ (4/5)

My progress

  • ⏱ Estimated time : ≈ 50 min

Sign in to track your progress and take notes. Sign in

⭐ Rate this lesson

5.0 initial rating from the teaching team

Sign in to rate this lesson →

💬 Questions about this lesson

No questions yet: be the first to ask for help or share your configuration.

Ask a question about this lesson →

Recommended Articles

Observing the Kubernetes network with Cilium Hubble

Make a Kubernetes cluster's network flows visible with Cilium Hubble: architecture, the hubble ob...

Container network security and Kubernetes networking

Secure the container network: how Docker and Kubernetes networking works, CNI, default-deny Netwo...

Kubernetes CNI: Flannel, Calico and Cilium compared

Kubernetes CNI: understand network plugins (Container Network Interface) and compare Flannel, Cal...

Securing Kubernetes: RBAC, NetworkPolicies, container network security and Pod Security

Securing Kubernetes: RBAC (Role, ClusterRole, bindings), ServiceAccounts, NetworkPolicies, Pod Se...

eBPF best practices for observability

Checklist for adopting eBPF in observability: choosing tools, gradual rollout, agent security, co...

eBPF explained: programs in the Linux kernel to observe without instrumenting

What eBPF is, how a program is verified and then run in the kernel, hook points (kprobes, uprobes...

Zero-code instrumentation with Grafana Beyla (OpenTelemetry eBPF Instrumentation)

Get RED metrics and HTTP/gRPC traces from any application without changing it: Grafana Beyla and ...

eBPF in production: security, prerequisites and limits

What to know before deploying eBPF agents: privileges and capabilities, kernel versions, managed ...

Deploying and operating Pyroscope on Kubernetes

Install Pyroscope with Helm, collect cluster profiles with Alloy (annotations and eBPF), size, se...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!