Overview
The network driver (CNI plugin) determines how Pod-to-Pod and Pod-to-Service networking works within Kubernetes clusters. The driver is selected in the cluster template and cannot be changed after cluster deployment. Xloud K8SaaS supports two drivers: Calico for production workloads requiring NetworkPolicy enforcement, and Flannel for simplified development environments.Driver Comparison
| Driver | NetworkPolicy | Performance | Encryption | Recommended For |
|---|---|---|---|---|
calico | Full Kubernetes NetworkPolicy | BGP (native routing) | Optional WireGuard | Production clusters requiring pod-level isolation |
flannel | None | VXLAN overlay (simple) | None | Development / test environments |
Calico Configuration
Calico is the recommended CNI for production Xloud K8SaaS clusters. It supports Kubernetes NetworkPolicy resources and provides BGP-based native routing for optimal performance in datacenter environments.Create Template with Calico
Create production template with Calico
Verify Calico is Running
After cluster deployment, confirm Calico components are healthy:Check Calico pods
calico-node pods on every node, all Running.
Check Calico node status
Flannel Configuration
Flannel provides a simple VXLAN overlay network. No NetworkPolicy support — all pods can communicate with all other pods across the cluster.Create development template with Flannel
Verify Flannel is Running
Check Flannel pods
kube-flannel DaemonSet pods on every node, all Running.
Applying NetworkPolicy (Calico clusters only)
After deploying a Calico cluster, you can apply Kubernetes NetworkPolicy resources to restrict Pod communication. Example policy to allow only intra-namespace traffic:Default deny-all ingress policy
Apply the policy
Network Driver Immutability
The CNI driver is set at cluster template creation and cannot be changed after a cluster is deployed. To switch CNI plugins:- Deploy a new cluster from a template with the desired driver
- Migrate workloads to the new cluster
- Delete the old cluster
Next Steps
Container Runtime
Configure the container runtime alongside the network driver in templates.
Security
Apply node security groups and restrict Kubernetes API server access.
Template Management
Publish templates with the correct network driver for project teams.
Troubleshooting
Diagnose CNI-related node NotReady issues and network failures.