Consider this:

There's a linux machine running on azure.

It has apache installed and browing to mymachine.com works, webpage is displayed. All ports are opened in the azure portal "networking settings".

Now there's a k8s kind cluster running on the machine too with a rabbitmq deployment as NodePort service port 32254.

kubectl get svc
  • kubernetes ClusterIP 443/TCP 3h17m
  • ng ClusterIP 80/TCP 68m
  • rabbitmq NodePort 5672:32740/TCP,15672:32254/TCP,15692:31802/TCP 143m
  • rabbitmq-nodes ClusterIP None 4369/TCP,25672/TCP 143m

All good, but I'm unable to access the rabbitmq cluster from outside.

The ip address of the control plane is, so this command works:


But connecting from outside does not work:

curl http://mymachine.com:32254 

So how do we forward from the public-ip of a VM in azure to an internal IP inside the VM?

1 Answer 1


you add the server to balancer then create NAT rule to forward the packet to specific port on your VM.


  • somehow only got it working with the public ip address set to static. but hey it works Jun 17, 2022 at 6:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.