cilium
by apecloud
eBPF-based Networking, Security, and Observability
About this chart
cilium
Cilium is open source software for providing and transparently securing network connectivity and loadbalancing between application workloads such as application containers or processes. Cilium operates at Layer 3/4 to provide traditional networking and security services as well as Layer 7 to protect and secure use of modern application protocols such as HTTP, gRPC and Kafka.
A new Linux kernel technology called eBPF is at the foundation of Cilium. It supports dynamic insertion of eBPF bytecode into the Linux kernel at various integration points such as: network IO, application sockets, and tracepoints to implement security, networking and visibility logic. eBPF is highly efficient and flexible.
Prerequisites
- Kubernetes:
>= 1.16.0-0 - Helm:
>= 3.0
Getting Started
Try Cilium on any Kubernetes distribution in under 15 minutes:
| Minikube | Self-Managed K8s | Amazon EKS | Google GKE | Microsoft AKS |
|---|---|---|---|---|
Or, for a quick install with the default configuration:
$ helm repo add cilium https://helm.cilium.io/
$ helm install cilium cilium/cilium --namespace=kube-system
After Cilium is installed, you can explore the features that Cilium has to offer from the Getting Started Guides page.
Source Code
Getting Help
The best way to get help if you get stuck is to ask a question on the Cilium Slack channel. With Cilium contributors across the globe, there is almost always someone available to help.
Values
| Key | Type | Default | Description |
|---|---|---|---|
| MTU | int | 0 | Configure the underlying network MTU to overwrite auto-detected MTU. |
| affinity | object | {"podAntiAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":[{"labelSelector":{"matchLabels":{"k8s-app":"cilium"}},"topologyKey":"kubernetes.io/hostname"}]}} | Affinity for cilium-agent. |
| agent | bool | true | Install the cilium agent resources. |
| agentNotReadyTaintKey | string | "node.cilium.io/agent-not-ready" | Configure the key of the taint indicating that Cilium is not ready on the node. When set to a value starting with ignore-taint.cluster-autoscaler.kubernetes.io/, the Cluster Autoscaler will ignore the taint on its decisions, allowing the cluster to scale up. |
| aksbyocni.enabled | bool | false | Enable AKS BYOCNI integration. Note that this is incompatible with AKS clusters not created in BYOCNI mode: use Azure integration (azure.enabled) instead. |
| alibabacloud.enabled | bool | false | Enable AlibabaCloud ENI integration |
| annotateK8sNode | bool | false | Annotate k8s node upon initialization with Cilium's metadata. |
| annotations | object | {} | Annotations to be added to all top-level cilium-agent objects (resources under templates/cilium-agent) |
| apiRateLimit | string | nil | The api-rate-limit option can be used to overwrite individual settings of the default configuration for rate limiting calls to the Cilium Agent API |
| authentication.enabled | bool | true | Enable authentication processing and garbage collection. Note that if disabled, policy enforcement will still block requests that require authentication. But the resulting authentication requests for these requests will not be processed, therefore the requests not be allowed. |
| authentication.gcInterval | string | "5m0s" | Interval for garbage collection of auth map entries. |
| authentication.mutual.connectTimeout | string | "5s" | Timeout for connecting to the remote node TCP socket |
| authentication.mutual.port | int | 4250 | Port on the agent where mutual authentication handshakes between agents will be performed |
| authentication.mutual.spire.adminSocketPath | string | "/run/spire/sockets/admin.sock" | SPIRE socket path where the SPIRE delegated api agent is listening |
| authentication.mutual.spire.agentSocketPath | string | "/run/spire/sockets/agent/agent.sock" | SPIRE socket path where the SPIRE workload agent is listening. Applies to both the Cilium Agent and Operator |
| authentication.mutual.spire.annotations | object | {} | Annotations to be added to all top-level spire objects (resources under templates/spire) |
| authentication.mutual.spire.connectionTimeout | string | "30s" | SPIRE connection timeout |
| authentication.mutual.spire.enabled | bool | false | Enable SPIRE integration (beta) |
| authentication.mutual.spire.install.agent.affinity | object | {} | SPIRE agent affinity configuration |
| authentication.mutual.spire.install.agent.annotations | object | {} | SPIRE agent annotations |
| authentication.mutual.spire.install.agent.image | object | {"digest":"sha256:99405637647968245ff9fe215f8bd2bd0ea9807be9725f8bf19fe1b21471e52b","override":null,"pullPolicy":"IfNotPresent","repository":"ghcr.io/spiffe/spire-agent","tag":"1.8.5","useDigest":true} | SPIRE agent image |
| authentication.mutual.spire.install.agent.labels | object | {} | SPIRE agent labels |
| authentication.mutual.spire.install.agent.nodeSelector | object | {} | SPIRE agent nodeSelector configuration ref: ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector |
| authentication.mutual.spire.install.agent.podSecurityContext | object | {} | Security context to be added to spire agent pods. SecurityContext holds pod-level security attributes and common container settings. ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod |
| authentication.mutual.spire.install.agent.securityContext | object | {} | Security context to be added to spire agent containers. SecurityContext holds pod-level security attributes and common container settings. ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container |
| authentication.mutual.spire.install.agent.serviceAccount | object | {"create":true,"name":"spire-agent"} | SPIRE agent service account |
| authentication.mutual.spire.install.agent.skipKubeletVerification | bool | true | SPIRE Workload Attestor kubelet verification. |
| authentication.mutual.spire.install.agent.tolerations | list | [{"effect":"NoSchedule","key":"node.kubernetes.io/not-ready"},{"effect":"NoSchedule","key":"node-role.kubernetes.io/master"},{"effect":"NoSchedule","key":"node-role.kubernetes.io/control-plane"},{"effect":"NoSchedule","key":"node.cloudprovider.kubernetes.io/uninitialized","value":"true"},{"key":"CriticalAddonsOnly","operator":"Exists"}] | SPIRE agent tolerations configuration By default it follows the same tolerations as the agent itself to allow the Cilium agent on this node to connect to SPIRE. ref: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ |
| authentication.mutual.spire.install.enabled | bool | true | Enable SPIRE installation. This will only take effect only if authentication.mutual.spire.enabled is true |
| authentication.mutual.spire.install.existingNamespace | bool | false | SPIRE namespace already exists. Set to true if Helm should not create, manage, and import the SPIRE namespace. |
| authentication.mutual.spire.install.initImage | object | {"digest":"sha256:223ae047b1065bd069aac01ae3ac8088b3ca4a527827e283b85112f29385fb1b","override":null,"pullPolicy":"IfNotPresent","repository":"docker.io/library/busybox","tag":"1.36.1","useDigest":true} | init container image of SPIRE agent and server |
| authentication.mutual.spire.install.namespace | string | "cilium-spire" | SPIRE namespace to install into |
| authentication.mutual.spire.install.server.affinity | object | {} | SPIRE server affinity configuration |
| authentication.mutual.spire.install.server.annotations | object | {} | SPIRE server annotations |
| authentication.mutual.spire.install.server.ca.keyType | string | "rsa-4096" | SPIRE CA key type AWS requires the use of RSA. EC cryptography is not supported |
| authentication.mutual.spire.install.server.ca.subject | object | {"commonName":"Cilium SPIRE CA","country":"US","organization":"SPIRE"} | SPIRE CA Subject |
| authentication.mutual.spire.install.server.dataStorage.accessMode | string | "ReadWriteOnce" | Access mode of the SPIRE server data storage |
| authentication.mutual.spire.install.server.dataStorage.enabled | bool | true | Enable SPIRE server data storage |
| authentication.mutual.spire.install.server.dataStorage.size | string | "1Gi" | Size of the SPIRE server data storage |
| authentication.mutual.spire.install.server.dataStorage.storageClass | string | nil | StorageClass of the SPIRE server data storage |
| authentication.mutual.spire.install.server.image | object | {"digest":"sha256:28269265882048dcf0fed32fe47663cd98613727210b8d1a55618826f9bf5428","override":null,"pullPolicy":"IfNotPresent","repository":"ghcr.io/spiffe/spire-server","tag":"1.8.5","useDigest":true} | SPIRE server image |
| authentication.mutual.spire.install.server.initContainers | list | [] | SPIRE server init containers |
| authentication.mutual.spire.install.server.labels | object | {} | SPIRE server labels |
| authentication.mutual.spire.install.server.nodeSelector | object | {} | SPIRE server nodeSelector configuration ref: ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector |
| authentication.mutual.spire.install.server.podSecurityContext | object | {} | Security context to be added to spire server pods. SecurityContext holds pod-level security attributes and common container settings. ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod |
| authentication.mutual.spire.install.server.securityContext | object | {} | Security context to be added to spire server containers. SecurityContext holds pod-level security attributes and common container settings. ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container |
| authentication.mutual.spire.install.server.service.annotations | object | {} | Annotations to be added to the SPIRE server service |
| authentication.mutual.spire.install.server.service.labels | object | {} | Labels to be added to the SPIRE server service |
| authentication.mutual.spire.install.server.service.type | string | "ClusterIP" | Service type for the SPIRE server service |
| authentication.mutual.spire.install.server.serviceAccount | object | {"create":true,"name":"spire-server"} | SPIRE server service account |
| authentication.mutual.spire.install.server.tolerations | list | [] | SPIRE server tolerations configuration ref: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ |
| authentication.mutual.spire.serverAddress | string | nil | SPIRE server address used by Cilium Operator If k8s Service DNS along with port number is used (e.g. ..svc(.*): format), Cilium Operator will resolve its address by looking up the clusterIP from Service resource. Example values: 10.0.0.1:8081, spire-server.cilium-spire.svc:8081 |
| authentication.mutual.spire.trustDomain | string | "spiffe.cilium" | SPIFFE trust domain to use for fetching certificates |
| authentication.queueSize | int | 1024 | Buffer size of the channel Cilium uses to receive authentication events from the signal map. |
| authentication.rotatedIdentitiesQueueSize | int | 1024 | Buffer size of the channel Cilium uses to receive certificate expiration events from auth handlers. |
| autoDirectNodeRoutes | bool | false | Enable installation of PodCIDR routes between worker nodes if worker nodes share a common L2 network segment. |
| azure.enabled | bool | false | Enable Azure integration. Note that this is incompatible with AKS clusters created in BYOCNI mode: use AKS BYOCNI integration (aksbyocni.enabled) instead. |
| bandwidthManager | object | {"bbr":false,"enabled":false} | Enable bandwidth manager to optimize TCP and UDP workloads and allow for rate-limiting traffic from individual Pods with EDT (Earliest Departure Time) through the "kubernetes.io/egress-bandwidth" Pod annotation. |
| bandwidthManager.bbr | bool | false | Activate BBR TCP congestion control for Pods |
| bandwidthManager.enabled | bool | false | Enable bandwidth manager infrastructure (also prerequirement for BBR) |
| bgp | object | {"announce":{"loadbalancerIP":false,"podCIDR":false},"enabled":false} | Configure BGP |
| bgp.announce.loadbalancerIP | bool | false | Enable allocation and announcement of service LoadBalancer IPs |
| bgp.announce.podCIDR | bool | false | Enable announcement of node pod CIDR |
| bgp.enabled | bool | false | Enable BGP support inside C |
Deploy cilium with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has cilium on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartcilium is pinned at v1.15.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply