Home icon

Automate proxy injection for Amazon EKS on AWS Fargate using Kyverno

Containers Blog



This article demonstrates how to use Kyverno mutating admission policies to automatically inject corporate proxy environment variables into Amazon EKS on AWS Fargate pods without modifying application manifests.

  • AWS Fargate doesn't expose node-level configuration, requiring pod-level proxy injection for regulated environments routing traffic through corporate proxies
  • Kyverno MutatingPolicy injects HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables into containers at admission time
  • Namespace label selectors enable opt-in targeting, allowing safe deployment in mixed Fargate and EC2 clusters
  • Solution replaces per-workload proxy configuration with a single ~30-line YAML policy applied cluster-wide
  • Fluent Bit log router bypasses proxy via NO_PROXY entries, ensuring logs reach AWS CloudWatch directly
  • Init containers and sidecar containers receive proxy variables through separate mutations in the policy

This approach eliminates manual proxy configuration from deployment manifests while maintaining centralized, GitOps-compatible policy management across labeled namespaces.



Go to article

The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.

Related articles

May 17
2024
How to automate application log ingestion from Amazon EKS on Fargate into AWS CloudTrail Lake
Feb 12
2024
Using Amazon ECS with AWS Fargate to automate Azure DevOps Hosted Agents
Aug 31
2026
Optimize EKS operations with agents: Reduce MTTR with AWS DevOps Agent and a Kubernetes Operator
Aug 20
2026
Amazon EKS now supports certificate authority (CA) rotation with automated lifecycle management

The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.