AKS Service mixes externalTrafficPolicy

Neil Crow 0 Reputation points
2023-07-21T11:56:58.9866667+00:00

We are running a crushFTP pod on AKS.

There are 2 loadBalancer services defined

external on port 2222

internal on ports 443, 8080, 9090 & 2222

When I log into the web-console, there is widget on the homepage which shows recent logins.

I set externalTrafficPolicy : "Local" for the internal loadBalancer, previously it was set to "Cluster", the external loadBalancer was always set to "Local".

Since making the change when I log into the web-console I can see my local IP shown in the recent login list.

However when I login on port 2222 on iether the internal or external service then the Cluster IP is logged in the recent login widget and not my local IP address.

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,965 questions
Azure Load Balancer
Azure Load Balancer
An Azure service that delivers high availability and network performance to applications.
421 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ammar-Abdelqader01 1,156 Reputation points Microsoft Employee
    2023-07-25T07:13:55.5466667+00:00

    Hello @Neil Crow

    Thank you for your question.

    once you set externalTrafficPolicy : "Local" did you mention the port 2222?

    apiVersion: v1
    kind: Service
    metadata:
      name: example-service
    spec:
      selector:
        app: example
      ports:
        - port: 2222
          targetPort: 2222
      externalTrafficPolicy: Local
      type: LoadBalancer
    
    
    

    please check this document if still you have an issue could you please share with me the YAML file to take a look at it? without any personal information or business info.

    Thank you!

    If this has been helpful, please take a moment to accept answers as this helps increase the visibility of this question for other members of the Microsoft Q&A community. Thank you for helping to improve Microsoft Q&A!

    User's image

    0 comments No comments