Run Calico node as non-privileged and non-root
Run long-lived Calico components in non-privileged and non-root containers.
Running Calico in non-privileged and non-root mode is an option for users who want to secure Calico as much as possible, and who do not care about Calico features beyond the basic Calico networking and network policy. The tradeoff for more security is the overhead of Calico networking management. For example, you no longer receive Calico corrections to misconfigurations caused by other components within your cluster, along with limited support for new features.
To run Calico as securely as possible, long-running Calico components (for example calico/node), can be run without privileged and root permissions in their respective containers. Note that to set up these components, the init containers still need to run with privileged and root permissions, but the risk to cluster security is minimal because of the ephemeral nature of init containers.
- Operator installation only.
- Calico Enterprise
- eBPF dataplane
- WorkloadSourceSpoofing felix option and the related
Support for features added after Calico v3.21 is not guaranteed.
Follow the Tigera Calico operator installation instructions. If you have already installed the operator, skip to the next step.
Edit the Calico installation to set the
kubectl edit installation default
Your installation resource should look similar to the following:
- blockSize: 26
calico-nodepods in the
calico-systemnamespace should now restart. Verify that they restart properly.
watch kubectl get pods -n calico-system
Calico should now be running
calico-node in non-privileged and non-root containers.