Network Policies
Kubernetes has a Network Policy resource type that allows the creation of the rules that govern how pods communicate with each other.
By default, vCluster ignores these resources. However, once you enable synchronization of the Network Policies, vCluster will ensure correct policies are created in the host cluster to achieve the desired traffic behaviour.
info
Network Policies in vCluster rely on the support for this feature in the host cluster. Make sure that your host cluster satisfies the Network Policy prerequisites.
Enable Network Policy Sync
To enable the synchronization of the Network Policy resources add the following to your values.yaml
:
sync:
networkpolicies:
enabled: true
then create or upgrade the vCluster with:
vcluster create my-vcluster --upgrade -f values.yaml