Skip to main content
In this lesson we will go over how to install Cilium using the Cilium CLI.
A presentation title slide with the text "Installing Cilium With CLI" on a blue-green gradient background. A small "© Copyright KodeKloud" appears in the lower-left corner.

Download and install the Cilium CLI

First, download the Cilium CLI binary appropriate for your platform and install it into your PATH. The example below targets Linux; macOS and Windows users can find platform-specific binaries on the Cilium releases page. Recommended links: Example (Linux):
# Determine the stable CLI version
CILIUM_CLI_VERSION=$(curl -s https://raw.githubusercontent.com/cilium/cilium-cli/main/stable.txt)

# Default architecture; override for aarch64
CLI_ARCH=amd64
if [ "$(uname -m)" = "aarch64" ]; then
  CLI_ARCH=arm64
fi

# Download the tarball and checksum
curl -L --fail --remote-name-all "https://github.com/cilium/cilium-cli/releases/download/${CILIUM_CLI_VERSION}/cilium-linux-${CLI_ARCH}.tar.gz"{,.sha256sum}

# Extract and install
tar xzf "cilium-linux-${CLI_ARCH}.tar.gz"
sudo mv cilium /usr/local/bin/
Verify the installation:
cilium version
Notes:
  • For macOS use the darwin tarball; for Windows use the appropriate zip.
  • If you prefer package managers, check the Cilium docs for Homebrew, Chocolatey, or distribution packages.

Install Cilium into the cluster

The Cilium CLI uses your current kubeconfig context to determine which cluster to install into. Ensure your kubeconfig points to the intended cluster before running the installer. Warning: make sure you are targeting the correct cluster/context to avoid accidental changes to production clusters.
Ensure your kubeconfig context is set to the intended cluster before running cilium install. Installing Cilium will create ClusterRoles, DaemonSets, Deployments, and other cluster-scoped resources.
Run the installer:
cilium install
Wait for components to become healthy. Use —wait to block until readiness conditions are met:
cilium status --wait
Example output (truncated):
/'`\
/'--\__\
\__/--/
 \__/

Cilium:        OK
Operator:      OK
Hubble:        disabled
ClusterMesh:   disabled

DaemonSet            cilium               Desired: 2, Ready: 2/2, Available: 2/2
Deployment           cilium-operator      Desired: 2, Ready: 2/2, Available: 2/2
Containers:          cilium-operator      Running: 2
                     cilium               Running: 2
Image versions       cilium               quay.io/cilium/cilium:v1.9.5: 2
                     cilium-operator      quay.io/cilium/operator-generic:v1.9.5: 2
A successful deployment shows components (DaemonSet, Deployment, containers) with matching Desired/Ready/Available counts.

Preview resources with a dry run

If you want to review the exact Kubernetes manifests that will be applied without changing the cluster, use a dry run. This is useful for auditing and validating Helm values before applying them.
cilium install --dry-run
This prints the rendered YAML to stdout so you can inspect it, pipe to a file, or run kubectl apply -f - later when ready.

Common CLI commands

CommandPurposeNotes
cilium installInstall Cilium using current kubeconfig contextUses Helm under the hood
cilium install --dry-runRender manifests without applyingGood for validation/auditing
cilium status --waitWait until Cilium components are readyBlocks until readiness conditions
cilium uninstallRemove Cilium resources from clusterUse with caution in production

Configuring Cilium at install time

The Cilium CLI uses the Cilium Helm chart to render manifests. You can customize installation by supplying Helm values either inline via --helm-set or from a values file via --values. Examples:
# Pass individual Helm values from the CLI
cilium install \
  --helm-set ipv6.enabled=true \
  --helm-set routingMode=native \
  --helm-set autoDirectNodeRoutes=true

# Or use a YAML values file
cilium install --values values.yaml
For a complete list of configuration keys, review the Helm chart’s values.yaml in the Cilium GitHub repository or the chart documentation.
The available configuration keys come from the Cilium Helm chart. Use —dry-run to preview the final rendered manifest or check the chart’s values.yaml to see all options.

Sample values.yaml

Below is an example values.yaml that enables IPv6 and configures dual-stack IPAM using a cluster pool. Adjust CIDRs and other options to match your network design and cluster requirements.
# Enable IPv6 support
ipv6:
  enabled: true

# Enable dual-stack mode (optional, if using both IPv4 and IPv6)
ipam:
  mode: "cluster-pool"
  operator:
    clusterPoolIPv6PodCIDRList:
      - "fd00::/104" # Adjust based on your network setup

# Use native routing mode (recommended for better performance)
routingMode: "native"

# eBPF/networking-related settings
bpf:
  masquerade: true
  tproxy: true

Best practices and references

With these steps you can install and configure Cilium using the CLI, preview resources before applying changes, and supply Helm values either inline or via a values file.

Watch Video