Configure NodePort in AKS

Viewed 39

Wonder how to implement Service NodePort in Private AKS. After following the official documentations and setting a Service Type NodePort, AKS nodes do not listen on the NodePort. Below shows the command execution. There is no "31004" (NodePort) listening on the node.

root@student:~# kubectl get svc
NAME               TYPE        CLUSTER-IP    EXTERNAL-IP   PORT(S)        AGE
azure-vote-back    ClusterIP   10.0.17.198   <none>        6379/TCP       11h
azure-vote-front   NodePort    10.0.50.61    <none>        80:31004/TCP   11h

root@student:~# kubectl get no -o wide
NAME                                STATUS   ROLES   AGE   VERSION   INTERNAL-IP   EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION     CONTAINER-RUNTIME
aks-agentpool-42455660-vmss000000   Ready    agent   12h   v1.23.8   10.224.0.4    <none>        Ubuntu 18.04.6 LTS   5.4.0-1089-azure   containerd://1.5.11+azure-2
aks-agentpool-42455660-vmss000001   Ready    agent   12h   v1.23.8   10.224.0.5    <none>        Ubuntu 18.04.6 LTS   5.4.0-1089-azure   containerd://1.5.11+azure-2

root@student:~# kubectl debug no/aks-agentpool-42455660-vmss000000 -it --image=mcr.microsoft.com/dotnet/runtime-deps:6.0;
Creating debugging pod node-debugger-aks-agentpool-42455660-vmss000000-x9w5s with container debugger on node aks-agentpool-42455660-vmss000000.
If you don't see a command prompt, try pressing enter.
root@aks-agentpool-42455660-vmss000000:/# chroot /host

# netstat -tupln|sort
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:40059           0.0.0.0:*               LISTEN      -
tcp        0      0 10.224.0.4:19100        0.0.0.0:*               LISTEN      -
tcp        0      0 127.0.0.1:10248         0.0.0.0:*               LISTEN      -
tcp        0      0 127.0.0.1:20256         0.0.0.0:*               LISTEN      -
tcp        0      0 127.0.0.1:36755         0.0.0.0:*               LISTEN      -
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      -
tcp6       0      0 :::10249                :::*                    LISTEN      -
tcp6       0      0 :::10250                :::*                    LISTEN      -
tcp6       0      0 :::10256                :::*                    LISTEN      -
tcp6       0      0 :::10257                :::*                    LISTEN      -
tcp6       0      0 :::111                  :::*                    LISTEN      -
tcp6       0      0 :::20257                :::*                    LISTEN      -
tcp6       0      0 :::22                   :::*                    LISTEN      -
tcp6       0      0 :::29603                :::*                    LISTEN      15307/livenessprobe
tcp6       0      0 :::29605                :::*                    LISTEN      -
tcp6       0      0 :::29613                :::*                    LISTEN      16255/livenessprobe
tcp6       0      0 :::29615                :::*                    LISTEN      -
tcp6       0      0 :::43955                :::*                    LISTEN      -
udp        0      0 0.0.0.0:111             0.0.0.0:*                           -
udp        0      0 0.0.0.0:32928           0.0.0.0:*                           -
udp        0      0 0.0.0.0:940             0.0.0.0:*                           -
udp        0      0 10.224.0.4:68           0.0.0.0:*                           -
udp        0      0 127.0.0.1:323           0.0.0.0:*                           -
udp        0      0 127.0.0.1:665           0.0.0.0:*                           -
udp        0      0 127.0.0.53:53           0.0.0.0:*                           -
udp6       0      0 ::1:323                 :::*                                -
udp6       0      0 :::111                  :::*                                -
udp6       0      0 :::35842                :::*                                -
udp6       0      0 :::940                  :::*                                -
0 Answers
Related