Introduction
Kubernetes networking has evolved significantly over time. Traditional Container Network Interfaces (CNIs) rely heavily on iptables, which can introduce performance and scalability challenges.
With vSphere Kubernetes Service (VKS), you can now leverage Cilium CNI, an eBPF-powered networking solution that delivers high performance, advanced security, and deep observability.
In this blog, we will walk through how to deploy a VKS cluster using Cilium CNI in a simple and practical way.
What You’ll Learn
- What Cilium CNI is and how it works
- Why Cilium is a better alternative to traditional CNIs
- How to deploy a VKS cluster with Cilium
- How to verify and validate the deployment
- Key benefits and real-world use cases
What is Cilium CNI?
Cilium is the network plugin (CNI) for your Kubernetes cluster. It runs pod networking and firewall-style rules using eBPF in the Linux kernel instead of lots of traditional iptables rules.
Unlike traditional CNIs:
- No heavy reliance on iptables
- Faster packet processing
- More intelligent traffic handling
Why Use Cilium in VKS?
Using Cilium in VKS provides:
- High performance with eBPF
- Advanced L3–L7 security policies
- Deep observability with Hubble
- Better scalability for large clusters
Installation Prerequisites
To provision VKS clusters with Cilium, your environment must meet the following requirements:
- VKS version 3.6 or later
- VKr version 1.35 or later
- VKS Standard Package repository (v3.6.0+20260320 or later) containing the Cilium add-on
Deploying and Validating Cilium on VKS Cluster
In this example my VKS Cluster name is vks-cluster-01 and VKS Cluster namespace is cilium-cni-demo.
# Run following command on Supervisor Cluster # kubectl get addons -A NAMESPACE NAME AGE vmware-system-vks-public cilium 9h # kubectl get addonreleases -A NAMESPACE NAME ADDON AGE vmware-system-vks-public cilium.kubernetes.vmware.com.1.19.1-vmware.1-vks.1 cilium 9h
Step1 : Create a file named cilium-addoninstall.yaml with the following content and replace values as per your infrastructure.
apiVersion: addons.kubernetes.vmware.com/v1alpha1
kind: AddonInstall
metadata:
name: <vks-cluster-name>-cilium
namespace: <vks-cluster-namespace>
spec:
addonRef:
name: cilium
clusters:
- constraints:
expression: "cluster.cniRefName() == 'cilium' && version_in_range(cluster.spec.topology.version, '>=1.35.0')"
selector:
matchLabels:
cluster.x-k8s.io/cluster-name: <vks-cluster-name>
stopMatchingBehavior: RetainApply it on the Supervisor
# Run following command on Supervisor Cluster # kubectl apply -f cilium-addoninstall.yaml addoninstall.addons.kubernetes.vmware.com/vks-cluster-01-cilium created
Step2 : Create a file named cilium-addonconfig.yaml with the following content.
AddonConfig resource allows you to override the default settings of packages.
In following example, we are Enabling Hubble Relay and UI.
apiVersion: addons.kubernetes.vmware.com/v1alpha1
kind: AddonConfig
metadata:
name: <vks-cluster-name>-cilium
namespace: <vks-cluster-namespace>
spec:
values:
hubble:
enabled: true
relay:
enabled: true
ui:
enabled: true
service:
type: LoadBalancer # supported values ClusterIP, NodePort, LoadBalancer# Run following command on Supervisor Cluster # kubectl apply -f cilium-addonconfig.yaml addonconfig.addons.kubernetes.vmware.com/vks-cluster-01-cilium created
Step3 : Create a file named vks-cluster-with-cilium.yaml with the following content.
---
apiVersion: cluster.x-k8s.io/v1beta2
kind: Cluster
metadata:
name: <vks-cluster-name>
namespace: <vks-cluster-namespace>
spec:
clusterNetwork:
pods:
cidrBlocks:
- 192.0.2.0/16
serviceDomain: cluster.local
services:
cidrBlocks:
- 198.51.100.0/12
topology:
classRef:
name: builtin-generic-v3.6.0 # Depends on VKS version
namespace: vmware-system-vks-public # Don't change it
controlPlane:
metadata:
annotations:
run.tanzu.vmware.com/resolve-os-image: os-name=photon
replicas: 3
variables:
- name: vmClass
value: <vm_class>
- name: storageClass
value: <storage_class>
- name: kubernetes
value:
etcdConfiguration:
maximumDBSizeGiB: 4
- name: bootstrapAddons
value:
cniRef:
name: cilium # Cilium CNI reference
- name: node
value:
firewall:
inboundRules:
- fromPort: 2379
protocol: tcp
toPort: 2380
- fromPort: 8472
protocol: udp
toPort: 8472
- fromPort: 4240
protocol: tcp
toPort: 4240
- fromPort: 4244
protocol: tcp
toPort: 4244
- fromPort: 31235
protocol: tcp
toPort: 31235
- protocol: icmp
version: v1.35.0+vmware.2-vkr.4 # VKr compatible version depends on VKS service
workers:
machineDeployments:
- class: node-pool
metadata:
annotations:
run.tanzu.vmware.com/resolve-os-image: os-name=photon
name: photon-worker
replicas: 3
variables:
overrides:
- name: node
value:
firewall:
inboundRules:
- fromPort: 8472
protocol: udp
toPort: 8472
- fromPort: 4240
protocol: tcp
toPort: 4240
- fromPort: 4244
protocol: tcp
toPort: 4244
- fromPort: 31235
protocol: tcp
toPort: 31235
- protocol: icmp
# Run following command on Supervisor Cluster # kubectl apply -f vks-cluster-with-cilium.yaml cluster.cluster.x-k8s.io/vks-cluster-01 created
Step4 : Validation of Cilium Addon and Related Objects
# kubectl get addoninstall -n cilium-cni-demo NAME ADDON PAUSED AGE vks-cluster-01-cilium cilium 95m # kubectl get addonconfig -n cilium-cni-demo NAME ADDONCONFIGDEFINITION CLUSTER READY AGE vks-cluster-01-cilium cilium.kubernetes.vmware.com.1.19.1---vmware.1-vks.1 vks-cluster-01 True 91m # kubectl get cluster -n cilium-cni-demo NAME CLUSTERCLASS AVAILABLE CP DESIRED CP AVAILABLE CP UP-TO-DATE W DESIRED W AVAILABLE W UP-TO-DATE PHASE AGE VERSION vks-cluster-01 builtin-generic-v3.6.0 True 3 3 3 3 3 3 Provisioned 85m v1.35.0+vmware.2 # kubectl get clusteraddon -n cilium-cni-demo NAME CLUSTER ADDON ADDONINSTALL RELEASE READY AGE vks-cluster-01-cilium vks-cluster-01 cilium vks-cluster-01-cilium cilium.kubernetes.vmware.com.1.19.1-vmware.1-vks.1 True 85m
Generate VKS Cluster(vks-cluster-01-kubeconfig) Kubeconfig file and run following command to check Cilium pods status
# Run following command on Supervisor Cluster # kubectl --kubeconfig vks-cluster-01-kubeconfig get pods -A | grep -i cilium kube-system cilium-bq2hl 1/1 Running 0 95m kube-system cilium-envoy-2g55q 1/1 Running 0 95m kube-system cilium-envoy-6dd5m 1/1 Running 0 95m kube-system cilium-envoy-9dkb8 1/1 Running 0 95m kube-system cilium-envoy-hf2lh 1/1 Running 0 95m kube-system cilium-envoy-hgwhf 1/1 Running 0 95m kube-system cilium-envoy-k8tgg 1/1 Running 0 95m kube-system cilium-gkx5h 1/1 Running 0 95m kube-system cilium-nxzvt 1/1 Running 0 95m kube-system cilium-operator-765c588c67-nxcn6 1/1 Running 0 95m kube-system cilium-operator-765c588c67-v8wxj 1/1 Running 0 95m kube-system cilium-pcvk5 1/1 Running 0 95m kube-system cilium-pjsb5 1/1 Running 0 95m kube-system cilium-wtp5z 1/1 Running 0 95m
Step5 : Validating Cilium Cluster Status Using Cilium CLI
Cilium provides a powerful CLI tool called cilium that helps you check cluster health, connectivity, and overall status.
Install Cilium CLI
curl -L --remote-name https://github.com/cilium/cilium-cli/releases/latest/download/cilium-linux-amd64.tar.gz
tar xzvf cilium-linux-amd64.tar.gz
sudo mv cilium /usr/local/bin/
Switch to VKS Cluster Context
# kubectl vsphere login --server=<supervisor-ip> -u <devops-username> --insecure-skip-tls-verify --tanzu-kubernetes-cluster-name <vks-cluster-name> --tanzu-kubernetes-cluster-namespace <vks-cluster-namespace>
# cilium status
/¯¯\
/¯¯\__/¯¯\ Cilium: OK
\__/¯¯\__/ Operator: OK
/¯¯\__/¯¯\ Envoy DaemonSet: OK
\__/¯¯\__/ Hubble Relay: OK
\__/ ClusterMesh: disabled
DaemonSet cilium Desired: 6, Ready: 6/6, Available: 6/6
DaemonSet cilium-envoy Desired: 6, Ready: 6/6, Available: 6/6
Deployment cilium-operator Desired: 2, Ready: 2/2, Available: 2/2
Deployment hubble-relay Desired: 1, Ready: 1/1, Available: 1/1
Deployment hubble-ui Desired: 1, Ready: 1/1, Available: 1/1
Containers: cilium Running: 6
cilium-envoy Running: 6
cilium-operator Running: 2
clustermesh-apiserver
hubble-relay Running: 1
hubble-ui Running: 1
Cluster Pods: 8/8 managed by Cilium
Helm chart version:
Image versions cilium projects.packages.broadcom.com/vsphere/supervisor/vks-standard-packages/3.6.0-20260320/vks-standard-packages@sha256:3a6b48ec1479923688b6113841db971b8abdb4f62cdf8b45a7a4042e8e334da8: 6
cilium-envoy projects.packages.broadcom.com/vsphere/supervisor/vks-standard-packages/3.6.0-20260320/vks-standard-packages@sha256:6a9633c26c5421542ff227ed191d48c9b4c45daf3fed4996a80bab44c60c1062: 6
cilium-operator projects.packages.broadcom.com/vsphere/supervisor/vks-standard-packages/3.6.0-20260320/vks-standard-packages@sha256:b5de35f456a64a6dc56c3aea30061f4c50517b87ae5e0a67d09edbe4209e8cde: 2
hubble-relay projects.packages.broadcom.com/vsphere/supervisor/vks-standard-packages/3.6.0-20260320/vks-standard-packages@sha256:6c5ce6a4f8d466e012d88c7840cc556abb05376c3aa7870bb7a76a68c43ef280: 1
hubble-ui projects.packages.broadcom.com/vsphere/supervisor/vks-standard-packages/3.6.0-20260320/vks-standard-packages@sha256:305c1ffba18237031051634da3304ca167b58dc719e594b0ba2b3a8be48f9aab: 1
hubble-ui projects.packages.broadcom.com/vsphere/supervisor/vks-standard-packages/3.6.0-20260320/vks-standard-packages@sha256:5577af41b78aaff9fc0b5a4d878359a3a2f10ba3f056cba19870581dd0520274: 1Key Takeaways
- Cilium CNI brings modern Kubernetes networking to VKS using eBPF, eliminating the limitations of traditional iptables-based CNIs
- It delivers high performance and low latency, making it ideal for production-grade and large-scale environments
- Built-in observability with Hubble provides deep visibility into service-to-service communication
- Supports advanced security policies (L3–L7), enabling fine-grained control over application traffic
- Seamless integration with VKS through standard packages simplifies deployment and lifecycle management
- The Cilium CLI makes it easy to validate cluster health, connectivity, and troubleshoot issues
- Cilium is a strong choice for organizations looking to build secure, scalable, and future-ready Kubernetes platforms
Disclaimer
This blog is for informational and educational purposes only. The configurations, examples, and architectural guidance provided are based on general best practices and publicly available references.
Always validate configurations in a non-production environment before applying them to live systems. Features and integrations may vary depending on the versions of VKS, VKr, LCI, Supervisor and vCenter Server being used. The author is not responsible for any unintended impact caused by the use of this information in production environments.
Contents, and opinions are my own and do not reflect the opinions of my employer.
