Skip to main content
Kubernetes is the platform that many teams use to run applications as containers. A cluster is the group of machines that runs them, and a pod is the small unit that holds an application’s containers and often exists for only minutes. That changes the unit of security from a server with a fixed IP address to a short-lived workload. Aviatrix applies the same identity-based policy model to clusters that it applies to virtual machines, so platform and security teams share one set of controls.

Business Challenge

Many Kubernetes security tools either add software beside every application (known as a sidecar) or replace the cluster’s networking layer (the CNI plugin). Both choices tie your security model to one platform decision and add cost that grows with the number of workloads. Outbound traffic from a cluster usually leaves through the machine that runs the workload, so the address that a destination sees identifies that machine rather than the application. As a result, you cannot write a rule for what one team’s application is allowed to reach.

The Business Case for Kubernetes Workload Security

Risk Mitigation

  • Egress control by application and team. Rules apply to a namespace (the part of a cluster that a team or application uses), a pod, or a whole cluster, and describe what a workload is allowed to reach instead of which machine it runs on.
  • Domain-based filtering at the boundary. A compromised workload can reach only the destinations that policy permits.
  • Unsafe rules rejected before they land. An admission policy engine, which checks each change before the cluster accepts it, can block a rule such as a permit to every address (0.0.0.0/0).
  • Accountable change. Teams review each policy change in Git, the version-control system, so every change is auditable.

Operational Efficiency

  • No extra software in every workload. Gateways enforce egress policy at the VPC or VNet boundary instead of a sidecar beside each application, so cost does not grow with the number of workloads.
  • Policy as code. Developers and security engineers write rules in the same kind of configuration files that they use to deploy applications, and review them like code.
  • One engine for every workload. Rules, WebGroups, and logging stay consistent across Kubernetes and non-Kubernetes workloads.

Strategic Value

  • Platform independence. The same model covers Amazon EKS, Azure AKS, Google GKE, and clusters that you run yourself, so a platform decision does not dictate your security model.
  • Shared ownership. Platform and security teams work from one set of controls instead of two.

How Aviatrix Addresses Kubernetes Risk

You connect a cluster to the Aviatrix Controller, a step called onboarding, and define egress policy for its workloads. Distributed Cloud Firewall (DCF) then controls traffic from the cluster to destinations outside the VPC or VNet, where Aviatrix gateways enforce it. DCF for Kubernetes applies to traffic that leaves the VPC or VNet only. For traffic between pods inside a cluster, DCF can translate rules into Kubernetes NetworkPolicy objects, the built-in Kubernetes traffic rules, which the cluster’s networking plugin (CNI) enforces.
Kubernetes workload security architecture: FirewallPolicy and WebgroupPolicy custom resources are reconciled by the Aviatrix Controller into SmartGroups and Distributed Cloud Firewall rules, which an Aviatrix Spoke Gateway enforces on pod egress leaving the VPC or VNet, permitting declared destinations and denying the rest, while traffic between pods inside a cluster uses Kubernetes network rules enforced by the cluster networking plugin.
Custom resources become DCF rules that a Spoke gateway enforces on pod egress.

Onboard Clusters

Aviatrix supports Amazon EKS, Azure AKS, and Google GKE, which are the managed Kubernetes services of each cloud. It also supports custom clusters that you run yourself, and private clusters whose management endpoint (the API server) is not exposed to the public internet.

Define Policy With Kubernetes Resources

The FirewallPolicy and WebgroupPolicy custom resource definitions (CRDs) add Aviatrix policy objects to Kubernetes. You manage egress rules with kubectl, the standard Kubernetes command-line tool, or with a GitOps pipeline, in which Git is the source of truth for configuration. Kubernetes role-based access control (RBAC) controls who can change policy, and an admission policy engine such as OPA/Gatekeeper or Kyverno rejects unsafe rules.

Key Components

DCF for Kubernetes

Identity-based egress policy for namespaces, pods, and services across EKS, AKS, GKE, and custom clusters.

Kubernetes CRDs

The FirewallPolicy and WebgroupPolicy resources for policy as code.

SmartGroups

Identity-based selectors that your Kubernetes policy references.

WebGroups

Domain allow-lists for outbound pod traffic.
Use these documents to plan and implement Kubernetes egress control.

Configuration Guides

Reference