Network policy
A network policy is a set of rules that permits or denies network traffic to and from selected workloads or endpoints.
Google Anthos in Action
A network policy is a configuration that controls which network connections are permitted between workloads or network endpoints.
- How it is used
- Uses NetworkPolicy to restrict in-cluster service traffic and Pod ingress or egress.
- How deep it goes
- Explains deployment roles and GKE enforcement differences but provides no NetworkPolicy manifest or configuration walkthrough.
- Examples
- Uses frontend-to-backend restrictions in a migrated multi-VM application and outbound traffic control as deployment scenarios.
- What you can do after
- Evaluate/understand where NetworkPolicy fits beside service-mesh and firewall controls, and which GKE component enforces it.
Acing the Certified Kubernetes Administrator Exam, Second Edition
A network policy is a Kubernetes API object that controls allowed traffic to and from pods using selectors and IP ranges.
- How it is used
- Controls and segregates pod traffic for Kubernetes networking and CKA administration tasks.
- How deep it goes
- Defines namespaced scope, default-deny behavior, ingress and egress rules, selectors, ports, and CNI support, but not internals.
- Examples
- Uses default-deny policies, nginx and busybox pods, selectors, TCP port 80, and wget verification.
- What you can do after
- Operate/configure policies with kubectl and YAML, then verify blocked or permitted pod traffic.
Read how Acing the Certified Kubernetes Administrator Exam, Second Edition explains network policy →
Related concepts
- podconfigures · A Kubernetes Pod is the smallest deployable unit in Kubernetes, grouping one or more co-located containers that share networking and other resources.
- Calicoimplemented by · Calico is an open-source networking and network-security platform for connecting and enforcing policies among containers, virtual machines, and hosts.
- Flannelcontrasts with · Flannel is a container networking solution that provides virtual network connectivity for Kubernetes clusters.
- network isolationconfigures · Network isolation is the restriction or separation of network communication so that systems or processes can communicate only across permitted paths or boundaries.
- Kubernetes resourcekind of · A Kubernetes resource is a persistent API-managed object representing the desired or observed state of a workload, configuration, or other cluster entity.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

