NetworkPolicy

A Kubernetes object that controls which pods may send traffic to or receive traffic from which others, by labels, namespaces and IP ranges.

In more detail

Pods are open until a policy selects them; policies only add allows, and a connection needs egress allowed at the source and ingress at the destination. The CNI plugin enforces them, and if it does not support them nothing does.

Example

kubectl describe networkpolicy web-ingress

Related terms

Related guides

Taught in

References

Certification courses