Overview
Aviatrix Distributed Cloud Firewall (DCF) for Kubernetes extends Zero Trust security to containerized workloads across AWS EKS, Azure AKS, Google GKE, and self-managed Kubernetes clusters. This integration provides identity-based security policies, secure egress control, and unified visibility for Kubernetes environments.DCF on Kubernetes Clusters is Generally Available (GA) as of Controller 10.1,
promoted from Feature Previews.
Key Capabilities
- Identity-Based Security — Enforce firewall policies based on Kubernetes identities (namespace, pod, service) rather than ephemeral IP addresses. Policies automatically follow workloads as they scale, move, or restart.
- Multicloud Kubernetes Security — Unified security policies across AWS EKS, Azure AKS, Google GKE, and self-managed clusters. Define security once, enforce everywhere.
- Native Kubernetes Integration — Define firewall policies using Kubernetes
Custom Resource Definitions (CRDs). Security policies are managed with the
same
kubectland YAML workflows your teams already use. - Secure Egress Control — Prevent unauthorized outbound traffic from Kubernetes workloads. Control egress at namespace, pod, and cluster levels with domain-based filtering.
- Advanced NAT and IP Management — Resolve IP overlap and exhaustion issues across multiple Kubernetes clusters with advanced NAT capabilities.
DCF currently enforces rules on traffic from Kubernetes clusters to
destinations outside the VPC/VNet only.
Supported Kubernetes Distributions
- AWS Elastic Kubernetes Service (EKS)
- Azure Kubernetes Service (AKS)
- Google Kubernetes Engine (GKE)
- Self-managed and private Kubernetes clusters in cloud
Getting Started
To use DCF for Kubernetes:- Meet the prerequisites for your cloud provider.
- Enable Kubernetes Resource Discovery.
- Onboard your Kubernetes clusters. For private clusters, see Onboarding Private Kubernetes Clusters.
- Enable DCF policies for Kubernetes
- Optionally, install CRDs for in-cluster policy management.
- Create SmartGroups and DCF rules.
Enabling DCF Policies for Kubernetes
- CoPilot UI
- Terraform
To enable DCF policies for Kubernetes using the CoPilot UI, follow these steps:A notification appears to confirm the changes.
1
Enable Discovery of Kubernetes Resources
On Groups > Settings, click Enable on the Discovery of Kubernetes Resources card.See Discovery of Kubernetes Resources for more information.
2
Enable Enforcement on Kubernetes
On Security > Distributed Cloud Firewall > Settings, click Enable on the Enforcement on Kubernetes card.
Managing Policies with Kubernetes CRDs
DCF policies can be defined directly inside Kubernetes clusters using Custom Resource Definitions (CRDs). This allows platform teams to manage firewall policies with the samekubectl and GitOps workflows used for application
deployments.
Installing the CRDs
Register the Aviatrix CRDs to your Kubernetes cluster using the Helm chart:Writing a Firewall Policy
AFirewallPolicy CRD defines egress rules for pods matching a label selector.
The following example permits pods with the label app: dev-pods in the dev
namespace to reach www.google.com on any protocol:
Writing a WebGroup Policy
AWebgroupPolicy CRD defines domain-based egress filtering as a standalone
resource. The following example permits pods with the label app: web-client in
the default namespace to reach specific domains:
Verifying Policy Status
Check policy events to confirm the policy was applied successfully:Warning type or a Reason ending in Failure, check that
the CRDs are installed correctly and that the Aviatrix Controller can reach the
cluster.
For the full schema of .status (including ruleset, attachmentPoint,
smartGroups[], and lastReconciledGeneration), see
Kubernetes CRD Reference.
Rule Ordering
Three things determine the order in which DCF evaluates rules generated from your custom resources.Within a Single FirewallPolicy
Rules underspec.rules[] are evaluated top-down in the order they appear. To
reorder rules, edit the resource and reapply.
Between Different FirewallPolicy Resources
MultipleFirewallPolicy resources have no deterministic order between each
other. They are peers in DCF. If two rules in two different FirewallPolicy
resources could match the same flow, the result is undefined.
FirewallPolicy vs. WebgroupPolicy
FirewallPolicy rules are always evaluated before WebgroupPolicy rules. Treat
WebgroupPolicy as the catch-all egress allow-list.
CR-Managed Rules vs. Admin-Authored DCF Rules
All CR-managed rules live inside a single dedicated section of the DCF policy tree. Your Aviatrix administrator can move that section above or below other hand-authored DCF rules. You cannot interleave individual CR rules with hand-authored DCF rules. The placement is per-section.Troubleshooting
Common Pitfalls
Reading Reconciliation Events
The Aviatrix Controller emits Kubernetes events on every reconciliation:Warning events with reasons such as:
- Spec is invalid: fix the CR spec.
- app domain with name X not found: a
namereference does not match an inline definition or any controller-side AppDomain. Either define it inline or have your Aviatrix administrator create it. - Failed to update k8s root attachment point: usually a controller-side conflict. The controller retries automatically.
Updating and Deleting Policies
Updating a Policy
Edit the resource and runkubectl apply. The Aviatrix Controller diffs the new
spec against the previous reconciled state, updates the affected DCF objects,
and removes any AppDomains that are no longer referenced. UUIDs of unchanged
rules are preserved so that features such as bandwidth tracking continue to
work.
Deleting a Policy
Runkubectl delete. A finalizer holds the resource until the controller has
cleaned up the attachment point, policy list, and all AppDomains the resource
created.
Cluster Offboarding Caveat
If you remove a cluster from Aviatrix while CRs still exist in it:- Aviatrix refuses the offboard if any SmartGroup elsewhere still references this cluster. Clean those references up first.
- Once offboarded, the controller stops watching the cluster. CRs in the cluster are no longer reconciled, and the DCF objects they previously created remain in place.