Skip to content

Support different service port and container ports for network policies? #493

@evandam

Description

@evandam

What happened:

Following up on aws/amazon-vpc-cni-k8s#3181 since it was closed and the comment recommended opening a new issue.

I have pretty much the same question: When using NetworkPolicies to restrict access to pods by selectors/namespaces, is it possible to have differing port numbers between service ports and container ports? The main functionality I'm looking for is to deny ingress traffic between namespaces. However, it feels unrealistic to assume that every service in the cluster uses the same mapping of service port number to container port.

Environment:

  • Kubernetes version (use kubectl version): v1.33.5-eks-3cfe0ce
  • CNI Version: v1.19.6-eksbuild.1
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions