Security with Cilium - cilium/cilium.io

Security with Cilium

Cilium is an open-source networking and security solution for cloud native environments. It is built using eBPF (Extended Berkeley Packet Filter) technology, which enables it to provide superior performance, scalability, and observability. In this document, we will highlight Cilium’s security features, such as network segmentation, microsegmentation, and its role in zero-trust security architectures.

Network Segmentation

Network segmentation is a security technique that divides a network into smaller, isolated segments to reduce the attack surface and improve security. Cilium provides network segmentation by allowing administrators to define policies that control how pods in a cluster can communicate with each other. These policies can be based on various criteria, such as pod labels, namespaces, and IP addresses.

Here is an example of a Cilium network policy that allows pods with label app: nginx in the default namespace to communicate with pods with label app: db in the database namespace on port 5432:

apiVersion: "cilium.io/v2"
kind: CiliumNetworkPolicy
metadata:
name: "nginx-database"
spec:
description: "Allow nginx pods to communicate with database pods"
endpointSelector:
matchLabels:
app: nginx
egress:
- toEndpoints:
- matchLabels:
app: db