What is microsegmentation? How it works in cloud and Kubernetes environments

What is microsegmentation? How it works in cloud and Kubernetes environments

Santerra Holler October 09, 2026

What is microsegmentation? How it works in cloud and Kubernetes environments

Book a Demo

Updated on November 4, 2026

Microsegmentation is a network security approach that divides an environment into very small, isolated segments, often down to a single workload, pod, or process, so that traffic between workloads, applications, and services flows only when a policy explicitly permits it. Traditional segmentation draws a few large boundaries, such as a DMZ, an internal network, and a database VLAN. Microsegmentation draws a boundary around every workload and controls east-west traffic (server-to-server traffic inside the environment), which perimeter firewalls never see. In cloud and Kubernetes environments, workloads appear and disappear in seconds and IP addresses change constantly. Segmentation there has to rely on identity, labels, and tags rather than static network addresses.

Key takeaways

  • ✓Microsegmentation limits lateral movement by allowing only explicitly approved connections between individual workloads, instead of trusting everything inside a network zone.
  • ✓In the cloud, microsegmentation is built from security groups, network security groups, firewall rules, and workload identity, and keeping those policies consistent across AWS, Azure, and GCP is the hardest part.
  • ✓In Kubernetes, microsegmentation is enforced at the CNI layer through NetworkPolicy objects that select pods by label, so stale or inconsistent labels directly weaken security.
  • ✓A safe microsegmentation rollout observes real traffic first, runs policies in monitor mode, and enforces default-deny last.
  • ✓Runtime traffic data is the most reliable input for segmentation policy because it shows which connections workloads actually make, not which ones a diagram says they should make.

Microsegmentation in networking: how it works

Microsegmentation in networking works by placing a policy-enforced boundary around each asset and checking every connection against an allowlist of approved flows. It is built from four technical components. The payoff is a smaller attack surface, breaches that stay contained, and visibility into internal traffic.

1. Telemetry and discovery

You cannot write a policy for traffic you have not seen, so projects start by collecting flow data from:

  • Cloud flow logs (AWS VPC Flow Logs, Azure VNet flow logs, GCP VPC Flow Logs)
  • Host-level telemetry from agents or eBPF sensors that record which process opened which connection
  • Kubernetes CNI observability tools such as Cilium’s Hubble
  • Service mesh telemetry (Istio, Linkerd) for layer 7 requests between services

2. Policy models: allowlist vs. denylist

A denylist blocks known-bad flows and permits everything else. An allowlist, also called default-deny, permits only named flows and blocks the rest. Microsegmentation relies on allowlists because attackers moving laterally use flows nobody anticipated, and a denylist cannot block a path you have not imagined.

3. Identity-based segmentation

Modern policies describe workloads by identity rather than location. “Allow app=checkout to reach app=payments on TCP 8443″ stays correct when pods reschedule or autoscaling groups replace instances. “Allow 10.0.4.17 to 10.0.9.22” breaks the moment either IP changes. Identity can come from labels, cloud tags, service accounts, or cryptographic identities such as SPIFFE IDs issued by a service mesh.

4. Enforcement points

Policy is enforced in one of three places:

  • Network-based: VLANs, ACLs, and firewalls on network devices. These controls are coarse and tied to IP constructs.
  • Hypervisor-based: rules applied in the virtual switch that all VM traffic passes through.
  • Host-based: the native firewall on each workload (iptables, nftables, eBPF, Windows Filtering Platform). Policies move with the workload, which makes this the most flexible option across data centers, cloud, bare metal, and endpoints.

Network security microsegmentation is effectively a distributed firewall. The rules sit next to each workload, so east-west traffic is inspected without hairpinning it through a central appliance.

Microsegmentation vs. traditional network segmentation

The two differ in granularity, policy basis, and traffic coverage. Traditional segmentation splits a network into a few large zones by IP subnet, while microsegmentation controls each workload by identity and inspects east-west flows inside a zone.

Dimension Traditional segmentation Microsegmentation Nanosegmentation
Unit of isolation Subnet, VLAN, or zone Individual workload, VM, or pod Individual process, container, or API call
Policy basis IP ranges and ports Labels, tags, identities Process identity, layer 7 attributes
Traffic covered Mostly north-south between zones East-west between workloads Within and between workloads, down to requests
Typical tools VLANs, perimeter firewalls, ACLs Host firewalls, security groups, NetworkPolicy Service mesh authorization, eBPF process-aware rules
Operational cost Low Medium High

Where Zero Trust fits

Under Zero Trust, no connection is trusted because of its network location. Every request must be authenticated and authorized. Microsegmentation applies Zero Trust to workload traffic and delivers three outcomes:

  • ✓Least privilege: each workload reaches only the services it needs, on the ports it needs.
  • ✓East-west control: a compromised web server cannot scan the subnet or reach the database admin port.
  • ✓Breach containment: the blast radius stays inside the compromised workload’s segment, and isolating that workload means changing one policy.

VM-based vs. container-based vs. Kubernetes-native approaches

Approach Identity source Enforcement Main difficulty
VM-based Hostname, cloud tags, agent identity Host firewall, hypervisor, security groups Agent rollout and legacy OS coverage
Container-based (non-orchestrated) Container image, Docker labels Host iptables, Docker network isolation Containers share the host network stack
Kubernetes-native Pod labels, namespaces, service accounts CNI plugin (Calico, Cilium, Antrea), service mesh Label hygiene and policy sprawl across many namespaces

How microsegmentation works in cloud workload segmentation

In the cloud, microsegmentation attaches fine-grained, identity-aware rules to each instance, function, or pod, so unauthorized traffic stops at the workload even when it shares a VPC or VNet with trusted systems. VPC and VNet boundaries are still traditional segmentation; microsegmentation happens inside them. For perimeter, routing, and edge controls, see our guide to cloud network security fundamentals.

AWS

  • Security groups are stateful, instance-level firewalls. A rule can reference another security group as its source, so “allow TCP 5432 from sg-app” stays valid as instances scale.
  • Network ACLs are stateless and apply at the subnet level. They are coarse guardrails, not microsegmentation.
  • EKS supports security groups for pods, plus IAM Roles for Service Accounts (IRSA) or EKS Pod Identity, giving pods separate network and API identities.

Azure

  • Network security groups (NSGs) apply at the subnet or NIC level.
  • Application security groups (ASGs) let NSG rules target logical groups such as “web-tier” instead of IP lists. This is Azure’s main identity-style construct.
  • Microsoft Entra Workload ID gives AKS pods a managed identity for Azure API access.

Google Cloud

  • VPC firewall rules target instances by network tag or, more securely, by service account, which cannot be changed by anyone who merely edits instance metadata.
  • Hierarchical firewall policies enforce organization- or folder-level guardrails above project rules.
  • GKE Workload Identity maps Kubernetes service accounts to Google service accounts.

The multi-cloud consistency problem

Each provider expresses the same intent differently. “Payments can only be reached by checkout” becomes a security group reference in AWS, an ASG rule in Azure, and a service-account-targeted firewall rule in GCP. Typical failures are the same application tagged differently in each cloud, hand-copied rules drifting apart, and no single view of which flows are actually permitted. The practical fix is to define policy once against a shared label taxonomy (for example app, env, data-class) and generate provider-specific rules through Terraform or a policy engine.

Editor’s tip: Network rules and identity permissions are two halves of the same segment. A pod blocked from the payments database over the network, but holding an IAM role that can read the database snapshot bucket, is not segmented. Review workload identity alongside security groups.

How microsegmentation fits into Kubernetes security architecture

Inside a cluster, microsegmentation is the enforcement layer. CNI-backed network policies control pod-to-pod and service traffic, while boundaries between trust zones usually sit outside the cluster. The Kubernetes security model has four layers, which are also the key features of Kubernetes security in the cloud: authentication and RBAC for the API server, admission control for what may run, pod security standards for how it runs, and network policy for what it may talk to. Microsegmentation is that last layer.

The building blocks

  • Namespaces: a logical boundary for teams or applications and the scope of a standard NetworkPolicy. Namespaces alone do not block traffic.
  • Labels and selectors: policies select pods with podSelector and other namespaces with namespaceSelector. Labels are the segmentation identity.
  • Ingress and egress rules: once any policy selects a pod for a direction, all traffic in that direction is denied unless a policy allows it. With no policy at all, every pod can talk to every other pod.
  • CNI plugin: Calico, Cilium, and Antrea enforce NetworkPolicy. Plain Flannel does not, so the object does nothing.
  • Services: policies apply to pod traffic, so a rule must select the backing pods, not the Service name.
  • Service mesh: Istio or Linkerd adds mTLS and layer 7 authorization (for example, allow only GET /orders). It works alongside CNI policy and does not replace it.

A policy example

These two policies create a default-deny posture in the shop namespace, then allow only the frontend to call the API on port 8080:

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: default-deny-all
  namespace: shop
spec:
  podSelector: {}
  policyTypes: [Ingress, Egress]
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: allow-frontend-to-api
  namespace: shop
spec:
  podSelector:
    matchLabels:
      app: api
  policyTypes: [Ingress]
  ingress:
  - from:
    - podSelector:
        matchLabels:
          app: frontend
    ports:
    - protocol: TCP
      port: 8080

You also need an egress rule letting every pod reach kube-dns on UDP and TCP port 53, or service discovery fails as soon as default-deny egress applies. Our explainer on how Kubernetes network policy works covers more patterns, including namespace isolation and ipBlock rules.

When to use separate clusters instead

Network policy segments workloads inside a trust zone. For genuinely different security zones, such as a PCI cardholder environment and a public marketing site, practitioners often run separate clusters with VLANs and external firewalls between them. Cilium can also expose services through virtual IPs announced over BGP or ARP, so individual nodes are not directly exposed.

Common Kubernetes security challenges microsegmentation helps solve

Of the common Kubernetes security challenges in cloud environments, the network-related ones are where microsegmentation pays off:

  • Network misconfigurations: the default allow-all pod network leaves every service reachable from any compromised pod.
  • Threat propagation: segmentation cuts the lateral paths an attacker uses after exploiting one container.
  • Third-party integrations: monitoring agents, operators, and vendor workloads can be isolated to reduce their blast radius.
  • Vulnerable components: restricting which pods can reach the API server and control plane limits breach impact.
  • Weak network policies: a default-deny baseline closes gaps that ad hoc rules leave open.

Kubernetes also makes segmentation itself harder. Pods live for minutes, policies sprawl across hundreds of namespaces, external SaaS endpoints change IPs (Cilium’s FQDN-aware policies address this), mTLS hides layer 7 detail from network tools, and developers need to ship without filing a ticket for every new connection.

Microsegmentation examples in cloud and Kubernetes environments

Every example below follows one pattern. Identify the assets that matter, define which flows each one needs, and deny everything else. The flows shown are illustrative.

Three-tier application on AWS

Internet → ALB (sg-alb) → web (sg-web) → app (sg-app) → RDS (sg-db)
sg-web:  allow 443 from sg-alb only
sg-app:  allow 8080 from sg-web only
sg-db:   allow 5432 from sg-app only
Denied:  web → db, app → app (other instances), any → db:22

A compromised web instance reaches only the app tier on one port, never the database.

Microservices on Kubernetes

namespace shop (default-deny)
frontend → api:8080
api → orders:9000, api → inventory:9000
orders → postgres:5432
all pods → kube-dns:53
Denied: frontend → postgres, inventory → orders

If inventory runs a vulnerable library and is exploited, the attacker cannot query the orders database or pivot to the frontend.

Regulated workloads

For PCI DSS or HIPAA scope, cardholder or patient-data workloads get their own namespace or cluster and a data-class=restricted label, and only named services can connect to them. Egress is limited to approved endpoints, such as a payment processor’s FQDN. Tight segmentation also shrinks audit scope, because systems that provably cannot reach regulated data fall outside it.

Hybrid environments

Consider an on-premises Oracle database serving an AKS application. Host-based enforcement on the database server allows connections only from the AKS egress IPs or the nodes’ identity, while NSGs and Kubernetes policies restrict which pods may originate that traffic. Because host-based policies follow the workload, the same rule holds if the database later migrates to an Azure VM.

Dev, test, and production

Environment-based segmentation blocks all traffic between env=dev and env=prod, so a compromised test workload running weaker controls and debug tooling cannot reach production data.

How to implement microsegmentation: roadmap, mistakes, and KPIs

The safest way to implement microsegmentation is to observe real traffic first and enforce last, tightening policy in stages instead of switching on default-deny everywhere at once. If you are working out how to implement Kubernetes security in cloud environments, the same sequence applies to clusters, VMs, and serverless workloads.

Rollout roadmap

  1. Discover assets. Inventory every workload across accounts, subscriptions, projects, and clusters, including shadow ones. Untagged instances and unlabeled pods are your first gap list.
  2. Map dependencies. Use flow logs and runtime telemetry for a full business cycle, for example 30 days so month-end batch jobs appear. Record which service talks to which, on what port, from which process.
  3. Classify sensitivity. Tag workloads by data class and business criticality. Payment, identity, and customer-data stores get segmented first.
  4. Simulate policies. Generate candidate allowlists from observed flows and replay historical traffic against them. Calico’s staged policies and Cilium’s audit mode show what would have been dropped.
  5. Deploy in monitor mode. Apply policies as log-only and review would-be denials with application owners. Expect undocumented legitimate flows.
  6. Enforce gradually. Start with one namespace or tier. Enforce ingress first, then egress, which breaks more things, and roll out in waves with a tested rollback.
  7. Validate continuously. Run connectivity tests in CI, alert on new denied flows, and re-baseline when architectures change.

Should developers own their network policies? Usually yes, within guardrails. Platform teams set cluster-wide baselines such as default-deny, DNS access, and blocking the cloud metadata endpoint 169.254.169.254. Application teams ship service-specific policies alongside their manifests, and admission controllers such as Kyverno or OPA Gatekeeper can require a default-deny policy in every namespace.

Common mistakes

  • ✗Over-segmentation: per-pod rules for 400 microservices on day one create thousands of unmaintainable policies. Segment by application and sensitivity first.
  • ✗Stale labels: a pod relabeled app=api-v2 silently falls out of every policy selecting app=api. Enforce label standards at admission.
  • ✗Skipping dependency mapping: policies written from diagrams break the undocumented cron job or health check, and teams revert to allow-all.
  • ✗Unmanaged exceptions: “temporary” rules such as allow 0.0.0.0/0 on 443 become permanent. Give every exception an owner and an expiry date.
  • ✗Policy drift: manual console changes to security groups diverge from code. Detect drift against Terraform state and remediate it.

KPIs that prove it works

KPI What it measures How to track it
Policy coverage Percentage of workloads or namespaces under default-deny Inventory compared with policy selectors
Lateral movement paths Reachable paths from internet-exposed workloads to sensitive assets Attack path analysis before and after enforcement
Blocked unauthorized flows Denied connections, triaged into misconfigurations and suspicious activity CNI and firewall deny logs
Time to isolate a workload Minutes from detection to quarantine policy Incident response timestamps
Exception count and age Number of broad rules and how long they have existed Policy-as-code repository review

These metrics also answer what the role of Kubernetes security in cloud infrastructure is. Clusters host the most interconnected workloads in the estate. Without segmentation, that density gives an attacker many lateral paths; measured segmentation breaks it into contained compartments. For the surrounding controls, including RBAC, image scanning, and runtime detection, see our Kubernetes security best practices.

How Upwind supports microsegmentation with runtime context

Upwind supports microsegmentation by showing which workloads, processes, and APIs are actually running and communicating, so policies are built from observed flows rather than assumptions. Its lightweight eBPF sensors cover cloud and Kubernetes environments in one platform that includes posture management, workload protection, and detection and response. That breadth also covers the wider questions of Kubernetes and security. As of November 2026, Upwind holds a 4.8/5 rating from 88 reviews on Gartner Peer Insights. Upwind is a CNAPP rather than a segmentation enforcement product, so rules are still enforced through your CNI, cloud security groups, or host firewalls. What it brings to cloud security for Kubernetes segmentation programs:

  • ✓eBPF sensors give runtime visibility into actual workload communication
  • ✓Risk is prioritized by real runtime exposure, including loaded and reachable vulnerable packages
  • ✓Identity risk insight (CIEM) sits alongside network context
  • ✓API visibility shows which APIs carry sensitive data
  • ✓AI agents investigate threats, validate exposure, and generate fixes

Pairing that runtime evidence with the enforcement controls covered above is the most reliable way to keep microsegmentation accurate as workloads change.

FAQ

What is microsegmentation?

Microsegmentation is a network security approach that isolates very small segments, often down to a single workload, pod, or process, and allows traffic only when a policy explicitly permits it. Its main goal is to control east-west traffic and limit lateral movement inside cloud and Kubernetes environments.

How is microsegmentation different from traditional network segmentation?

Traditional segmentation creates a few large zones such as subnets or VLANs and usually relies on IP ranges and ports. Microsegmentation works at the workload level, uses labels, tags, and identities instead of static IPs, and inspects east-west traffic between workloads inside the environment.

How is microsegmentation enforced in Kubernetes?

In Kubernetes, microsegmentation is enforced through CNI-backed NetworkPolicy objects that select pods by label and define allowed ingress and egress traffic. This means label quality matters directly, because stale or inconsistent labels can weaken segmentation.

What cloud controls are commonly used for microsegmentation?

Common cloud controls include AWS security groups, Azure network security groups and application security groups, and Google Cloud VPC firewall rules. In practice, the challenge is keeping segmentation policy consistent across AWS, Azure, and GCP while expressing the same intent with different provider-specific constructs.

What is the safest way to roll out microsegmentation?

The safest rollout starts by observing real traffic and mapping dependencies before enforcing anything. Teams should simulate candidate allowlists, run policies in monitor mode, enforce gradually, and apply default-deny last so they avoid breaking legitimate application flows.

Demo the Upwind Platform

See how Upwind is reducing risk and strengthening cloud security for global enterprises.
Get a Demo
Add the Upwind RSS Feed to Slack
Connect the Upwind RSS Feed to your Slack.
Follow the how-to here.
Threat RSS
Add the Upwind RSS Feed to Slack
Connect the Upwind RSS Feed to your Slack.
Follow the how-to here.
Main RSS