<p>I have a service that lives inside my AKS cluster that requires both internal and external communication to authenticate against.</p>
<p>The current flow is this</p>
<p>GUI Application communicates to to ingress by FQDN, traffic gets handed off to Middleware, Middleware talks to another Middleware within the same Namespace and authenticates.</p>
<p>After the first set of authentication is performed, the GUI application then needs to communicate with the second middleware.</p>
<p>To accomplish this, I thought I would set up an external IP on the service so I can communicate with the pods within the namespace, but I am unable to resolve this externally. Within the Cluster, I can telnet and hit the Pod / IP just fine which tells me this is a network issue, I am just unsure as to where.</p>
<p>These are the steps I have performed so far:</p>
<pre><code># creating IP from prefix
az network public-ip create \
    --name mw-dev-ip \
    --resource-group AKS-Dev-Node \
    --allocation-method Static \
    --sku Basic \
    --version IPv4



# Get IP address
az network public-ip show \
-n mw-dev-ip \
-g AKS-Dev-Node \
--query &quot;ipAddress&quot; \
-o tsv

# Enter your details below.
PIP_RESOURCE_GROUP=AKS-Dev-Node
AKS_RESOURCE_GROUP=AKS-Dev
AKS_CLUSTER_NAME=AKS-Dev-Cluster
#
CLIENT_ID=$(az aks show --resource-group $AKS_RESOURCE_GROUP --name $AKS_CLUSTER_NAME --query &quot;servicePrincipalProfile.clientId&quot; --output tsv)
SUB_ID=$(az account show --query &quot;id&quot; --output tsv)
az role assignment create \
--assignee $CLIENT_ID \
--role &quot;Network Contributor&quot; \
--scope /subscriptions/$SUB_ID/resourceGroups/$PIP_RESOURCE_GROUP
</code></pre>
<p>Doing these steps above created the Load balancer with a public IP address that I was then able to add to my Service manifest as such</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  annotations:
    service.beta.kubernetes.io/azure-load-balancer-resource-group: AKS-Dev-Node
  name: {{ template &quot;mw.fullname&quot; . }}
  labels:
    app: {{ template &quot;mw.name&quot; . }}
    chart: {{ template &quot;mw.chart&quot; . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
spec:
  loadBalancerIP: {{ .Values.mw_host }}
  type: {{ .Values.service.type }}
  ports:
    - port: {{ .Values.service.port }}
      targetPort: {{ .Values.service.port }}
      protocol: TCP
      name: {{ .Values.service.name }}
    - port: {{ .Values.ping.port }}
      targetPort: {{ .Values.ping.port }}
      protocol: TCP
      name: {{ .Values.ping.name }}
  selector:
    app: {{ template &quot;mw.name&quot; . }}
    release: {{ .Release.Name }}
</code></pre>
<p>I am unsure what step I am missing though to hit this from the outside. I checked my NSG and all traffic is open, same for the firewall in front of it. Within the cluster I can telnet and hit it just fine as well as if I port forward the pod endpoint directly.</p>
<p>I can also telnet against the Endpoint IP of the pod(s) without issue as well, its just trying to route this external ip to the endpoints to hit the service from the outside.</p>
<p>Any helpful suggestions would be greatly appreciated.</p>

<p>Never mind, the problem was that I only updated the NSG for the AKS Node Resource Group, I did not update the AKS Resource Group as well. Once I exposed the ports to the Cluster itself, traffic ran through just fine.</p>
