liveBook · Manning

Network policy

A network policy is a set of rules that permits or denies network traffic to and from selected workloads or endpoints.

How 2 Manning books explain it

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.

Read how Google Anthos in Action explains network policy →

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 →

Also covered in

What to know first

Related concepts

Questions about network policy

What is network policy?

A network policy is a set of rules that permits or denies network traffic to and from selected workloads or endpoints.

Which Manning books explain network policy?

Google Anthos in Action and Acing the Certified Kubernetes Administrator Exam, Second Edition.

What should I know before learning network policy?

Manning books that teach network policy usually introduce container, egress traffic and ingress traffic first.

What is the difference between network policy and Flannel?

A network policy is a set of rules that permits or denies network traffic to and from selected workloads or endpoints. Flannel is a container networking solution that provides virtual network connectivity for Kubernetes clusters.

What is network policy a kind of?

Network policy is a kind of Kubernetes resource. 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.