static private IP for PODs inside AKS?

Haitao Huang 51 Reputation points

AKS supports static public IP assignment for a POD. Anyway I can assign static private IP for a POD? Example to create a service that application pods can use as default gateway?

Thank you!

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,987 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sam Cogan 10,342 Reputation points MVP

    Generally you do not want to assign a static IP to a pod, you want to create a service which will have a static private IP, and then assign the pod to the service. Assigning a private static IP to a pod is an anti-pattern in Kubernetes and isn't supported in standard Kubernetes. Certain CNI plugins may allow you to do this, but I don't believe the AKS ones will.

    0 comments No comments

  2. Haitao Huang 51 Reputation points

    @Sam Cogan , thank you! I think I did not get my question right in a way. I am trying to insert a service in AKS, one side facing Pod as nat or gateway for pods, other side facing outside for service access. Two challenges, one is to support multiple interfaces (seems not supported) or IP addresses (?), second is to assign a static pod gw or snat address. I found static public IP assignment for AKS which could be used for outside facing part, but not sure internal pod facing gw/snat address.

    It seems this setup probably is not going to work :(. Thank you!

    0 comments No comments