cilium

by VNG Cloud

Helm chartv1.17.14App 1.17.14Apache-2.0Verified publisher

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.21.0-0
  • Helm: >= 3.0

Getting Started

Try Cilium on any Kubernetes distribution in under 15 minutes:

MinikubeSelf-Managed K8sAmazon EKSGoogle GKEMicrosoft 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

KeyTypeDefaultDescription
MTUint0Configure the underlying network MTU to overwrite auto-detected MTU. This value doesn't change the host network interface MTU i.e. eth0 or ens0. It changes the MTU for cilium_net@cilium_host, cilium_host@cilium_net, cilium_vxlan and lxc_health interfaces.
affinityobject{"podAntiAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":[{"labelSelector":{"matchLabels":{"k8s-app":"cilium"}},"topologyKey":"kubernetes.io/hostname"}]}}Affinity for cilium-agent.
agentbooltrueInstall the cilium agent resources.
agentNotReadyTaintKeystring"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.enabledboolfalseEnable AKS BYOCNI integration. Note that this is incompatible with AKS clusters not created in BYOCNI mode: use Azure integration (azure.enabled) instead.
alibabacloud.enabledboolfalseEnable AlibabaCloud ENI integration
annotateK8sNodeboolfalseAnnotate k8s node upon initialization with Cilium's metadata.
annotationsobject{}Annotations to be added to all top-level cilium-agent objects (resources under templates/cilium-agent)
apiRateLimitstringnilThe 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.enabledbooltrueEnable 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.gcIntervalstring"5m0s"Interval for garbage collection of auth map entries.
authentication.mutual.connectTimeoutstring"5s"Timeout for connecting to the remote node TCP socket
authentication.mutual.portint4250Port on the agent where mutual authentication handshakes between agents will be performed
authentication.mutual.spire.adminSocketPathstring"/run/spire/sockets/admin.sock"SPIRE socket path where the SPIRE delegated api agent is listening
authentication.mutual.spire.agentSocketPathstring"/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.annotationsobject{}Annotations to be added to all top-level spire objects (resources under templates/spire)
authentication.mutual.spire.connectionTimeoutstring"30s"SPIRE connection timeout
authentication.mutual.spire.enabledboolfalseEnable SPIRE integration (beta)
authentication.mutual.spire.install.agent.affinityobject{}SPIRE agent affinity configuration
authentication.mutual.spire.install.agent.annotationsobject{}SPIRE agent annotations
authentication.mutual.spire.install.agent.imageobject{"digest":"sha256:5106ac601272a88684db14daf7f54b9a45f31f77bb16a906bd5e87756ee7b97c","override":null,"pullPolicy":"IfNotPresent","repository":"ghcr.io/spiffe/spire-agent","tag":"1.9.6","useDigest":true}SPIRE agent image
authentication.mutual.spire.install.agent.labelsobject{}SPIRE agent labels
authentication.mutual.spire.install.agent.nodeSelectorobject{}SPIRE agent nodeSelector configuration ref: ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector
authentication.mutual.spire.install.agent.podSecurityContextobject{}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.priorityClassNamestring""The priority class to use for the spire agent
authentication.mutual.spire.install.agent.resourcesobject{}container resource limits & requests
authentication.mutual.spire.install.agent.securityContextobject{}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.serviceAccountobject{"create":true,"name":"spire-agent"}SPIRE agent service account
authentication.mutual.spire.install.agent.skipKubeletVerificationbooltrueSPIRE Workload Attestor kubelet verification.
authentication.mutual.spire.install.agent.tolerationslist[{"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.enabledbooltrueEnable SPIRE installation. This will only take effect only if authentication.mutual.spire.enabled is true
authentication.mutual.spire.install.existingNamespaceboolfalseSPIRE namespace already exists. Set to true if Helm should not create, manage, and import the SPIRE namespace.
authentication.mutual.spire.install.initImageobject{"digest":"sha256:b3255e7dfbcd10cb367af0d409747d511aeb66dfac98cf30e97e87e4207dd76f","override":null,"pullPolicy":"IfNotPresent","repository":"docker.io/library/busybox","tag":"1.37.0","useDigest":true}init container image of SPIRE agent and server
authentication.mutual.spire.install.namespacestring"cilium-spire"SPIRE namespace to install into
authentication.mutual.spire.install.server.affinityobject{}SPIRE server affinity configuration
authentication.mutual.spire.install.server.annotationsobject{}SPIRE server annotations
authentication.mutual.spire.install.server.ca.keyTypestring"rsa-4096"SPIRE CA key type AWS requires the use of RSA. EC cryptography is not supported
authentication.mutual.spire.install.server.ca.subjectobject{"commonName":"Cilium SPIRE CA","country":"US","organization":"SPIRE"}SPIRE CA Subject
authentication.mutual.spire.install.server.dataStorage.accessModestring"ReadWriteOnce"Access mode of the SPIRE server data storage
authentication.mutual.spire.install.server.dataStorage.enabledbooltrueEnable SPIRE server data storage
authentication.mutual.spire.install.server.dataStorage.sizestring"1Gi"Size of the SPIRE server data storage
authentication.mutual.spire.install.server.dataStorage.storageClassstringnilStorageClass of the SPIRE server data storage
authentication.mutual.spire.install.server.imageobject{"digest":"sha256:59a0b92b39773515e25e68a46c40d3b931b9c1860bc445a79ceb45a805cab8b4","override":null,"pullPolicy":"IfNotPresent","repository":"ghcr.io/spiffe/spire-server","tag":"1.9.6","useDigest":true}SPIRE server image
authentication.mutual.spire.install.server.initContainerslist[]SPIRE server init containers
authentication.mutual.spire.install.server.labelsobject{}SPIRE server labels
authentication.mutual.spire.install.server.nodeSelectorobject{}SPIRE server nodeSelector configuration ref: ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector
authentication.mutual.spire.install.server.podSecurityContextobject{}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.priorityClassNamestring""The priority class to use for the spire server
authentication.mutual.spire.install.server.resourcesobject{}container resource limits & requests
authentication.mutual.spire.install.server.securityContextobject{}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.annotationsobject{}Annotations to be added to the SPIRE server service
authentication.mutual.spire.install.server.service.labelsobject{}Labels to be added to the SPIRE server service
authentication.mutual.spire.install.server.service.typestring"ClusterIP"Service type for the SPIRE server service
authentication.mutual.spire.install.server.serviceAccountobject{"create":true,"name":"spire-server"}SPIRE server service account
authentication.mutual.spire.install.server.tolerationslist[]SPIRE server tolerations configuration ref: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
authentication.mutual.spire.serverAddressstringnilSPIRE 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.trustDomainstring"spiffe.cilium"SPIFFE trust domain to use for fetching certificates
authentication.queueSizeint1024Buffer size of the channel Cilium uses to receive authentication events from the signal map.
authentication.rotatedIdentitiesQueueSizeint1024Buffer size of the channel Cilium uses to receive certificate expiration events from auth handlers.
autoDirectNodeRoutesboolfalseEnable installation of PodCIDR routes between worker nodes if worker nodes share a common L2 network segment.
azure.enabledboolfalseEnable Azure integration. Note that this is incompatible with AKS clusters created in BYOCNI mode: use AKS BYOCNI integration (aksbyocni.enabled) instead.
bandwidthManagerobject{"bbr":false,"enabled":false}Enable bandwidth manager to optimize TCP and UDP workloads and allow for rate-limiting traffic from individual Pods w

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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartcilium is pinned at v1.17.14 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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