Network policies
By default, this is disabled.
Sync NetworkPolicy resources from the cluster to the control plane cluster. This ensures correct policies are created in the control plane cluster to achieve the desired traffic behavior between pods.
Kubernetes NetworkPolicies are additive. Enabling this lets a tenant's own permissive NetworkPolicy reopen traffic that a platform-level default-deny was meant to close for the same pods. vCluster preserves a tenant's ipBlock peers unchanged, and it preserves a rule with no peers at all the same way. Neither carries tenant identity for vCluster to constrain, and Kubernetes treats a missing or empty peer list as matching every source or destination. Enable this only where the platform boundary uses a control tenants can't override, such as an AdminNetworkPolicy or a CNI-specific tiered policy. Otherwise, add control plane cluster admission that constrains synced ipBlock peers and rejects rules that omit their peer list entirely. See network and endpoint isolation.
Sync NetworkPolicies from the tenant to control plane cluster​
sync:
toHost:
networkPolicies:
enabled: true
NetworkPolicy resources inside clusters rely on the control plane cluster's support for this feature. Make sure that your control plane cluster satisfies the Network Policy prerequisites.
Patches​
Use sync.toHost.networkPolicies.patches to transform NetworkPolicy fields while syncing to the control plane cluster. See Patching synced resources for syntax, directionality, and examples.
Config reference​
For every field under sync.toHost.networkPolicies, see the sync reference.