24 / 25 · Operations and recovery

Network segmentation

Network segmentation limits which systems may communicate across network boundaries. It reduces reachability and blast radius. It does not replace identity checks, encryption or resource-level authorization.

What you will practise

  • Map required flows
  • separate ingress/egress
  • test allowed and denied paths

Before you start: Source, destination, port and application authorization.

About 4 minutes · offline-generated English female narration · captions included. Diagrams are conceptual; timings are illustrative.

Download MP4Captions

Listen without the videoDownload audio

The same pre-recorded voice as the video. Starting audio pauses the video, and starting the video pauses audio.

Chapters and full transcript

Let us understand network segmentation. A school separates the public reception, classrooms and locked records room. A visitor can enter reception without getting a path to every room. A classroom door being reachable still does not authorize reading a student file. Network access and application permission remain different checks. Network segmentation limits which systems may communicate across network boundaries. It reduces reachability and blast radius. It does not replace identity checks, encryption or resource-level authorization.

Follow the normal path. The public client needs the web tier, which needs booking. Booking needs the database. Record required ports and dependencies before introducing isolation. The unrelated worker has no business requirement to contact the orders database. Blocking that path reduces reachability and potential blast radius. SeatSpot public web traffic should not directly reach the orders database or administrative services. Booking may need a narrow database connection while an unrelated image worker does not.

Now change one condition. Permit the actual booking workload to use the configured database port. Broad namespace-wide rules may allow more callers than intended. A common misunderstanding is this: NetworkPolicy automatically works in every Kubernetes cluster. Enforcement depends on the network implementation and correct selector semantics. Think about this. A database port is reachable from a booking pod. Does that authorize every SQL operation? Pause the video and make your prediction. No. Network reachability is one boundary. Database credentials and application resource authorization still matter.

Let us reason with a concrete example. Only the booking workload should initiate the database application connection on its configured port. A rule allowing the whole namespace may expose more callers than intended; a narrower pod selector can express the required source if labels and enforcement are trustworthy. Test a permitted booking connection and a denied unrelated-worker connection. Also verify DNS and any cross-namespace behavior in the actual cluster. These figures are teaching examples, not production guarantees.

Turn the idea into a design decision. A policy object is only configuration intent. The cluster network implementation must support and enforce it, and selectors must match the intended workloads. An allowed TCP connection is not permission to read every order. Database credentials, encrypted transport and application ownership checks remain separate controls. When you try the practice task, look for this result. A supporting network implementation must actually enforce the policy; a YAML file alone proves nothing.

Check your understanding. Verify allowed traffic, denied traffic and necessary DNS/monitoring dependencies. Observe unexpected failures and refine the policy without silently opening everything. Here is a challenge. A pod has a NetworkPolicy but unwanted traffic still reaches it. What do you verify? Pause before the answer. Verify enforcement support, labels/selectors, namespace semantics, ingress/egress direction and other allowed rules. Test from the real source workload rather than only inspecting YAML. For an interview, discuss ingress, egress, DNS and actual connection tests. Say what you would measure, not only which tool you would buy.

Start with an everyday picture

A school separates the public reception, classrooms and locked records room. A visitor can enter reception without getting a path to every room. A classroom door being reachable still does not authorize reading a student file. Network access and application permission remain different checks.

Why SeatSpot needs this

SeatSpot public web traffic should not directly reach the orders database or administrative services. Booking may need a narrow database connection while an unrelated image worker does not.

Trace one step at a time

Move through the diagram at your pace. Teal paths are active; unavailable components are labelled.

Public clientWeb tierBooking tierOrders DBUnrelated worker

Step 1 of 6 · Flow inventory

Map required flows

The public client needs the web tier, which needs booking. Booking needs the database. Record required ports and dependencies before introducing isolation.

Read all six mechanism steps
  1. Map required flows

    The public client needs the web tier, which needs booking. Booking needs the database. Record required ports and dependencies before introducing isolation.

  2. Remove unnecessary paths

    The unrelated worker has no business requirement to contact the orders database. Blocking that path reduces reachability and potential blast radius.

  3. Allow a narrow connection

    Permit the actual booking workload to use the configured database port. Broad namespace-wide rules may allow more callers than intended.

  4. Verify enforcement

    A policy object is only configuration intent. The cluster network implementation must support and enforce it, and selectors must match the intended workloads.

  5. Keep identity checks

    An allowed TCP connection is not permission to read every order. Database credentials, encrypted transport and application ownership checks remain separate controls.

  6. Test both directions

    Verify allowed traffic, denied traffic and necessary DNS/monitoring dependencies. Observe unexpected failures and refine the policy without silently opening everything.

Pause and make a prediction

A database port is reachable from a booking pod. Does that authorize every SQL operation?

Answer aloud or write your reasoning in the lesson notes before revealing the explanation.

Correct a common misunderstanding

Claim to question: NetworkPolicy automatically works in every Kubernetes cluster.

Better explanation: Enforcement depends on the network implementation and correct selector semantics.

Create an allow/deny matrix

A paper or whiteboard task. No cloud account or paid infrastructure is required.

  1. List booking → database and unrelated-worker → database.
  2. Specify protocol/port and trustworthy selectors.
  3. Test allowed and denied paths, including required DNS.

Check what you can explain

This is your self-check, not an automated grade. Try again without the diagram tomorrow.

0 of 3 goals checked. Choose one remaining idea to practise next.

These checkboxes reset when you leave. Use your saved lesson notes and completion marker to record lasting progress.

Teach it back

Without looking, explain what this component changes, what it does not solve and what happens if it fails. Use the animation to check your explanation, then switch to Engineering.

Try it before viewing the solution

A pod has a NetworkPolicy but unwanted traffic still reaches it. What do you verify?

Check one key idea

NetworkPolicy enforcement requires:

Your explanation and interview notes

Saved only in this browser when storage is available. Export a backup from the course page before clearing browser data or moving devices.

Loading your local notes…

Official references and next reading

The explanation, fictional examples and animations are original teaching material. Vendor behavior depends on the specific product/version; use its documentation before deploying.