Azure aks could not access to EXTERNAL-IP

2/1/2019

I just create aks And create the sample service.

kubectl get service azure-vote-front --watch

NAME               TYPE           CLUSTER-IP   EXTERNAL-IP    PORT(S)        AGE  
azure-vote-front   LoadBalancer   10.0.1.71    13.71.XXX.XXX   80:31619/TCP   1h  

I want to acccsss to 13.71.xxx.xxx:31619 but it is waiting not to return.

-- NoDirection
azure-aks
azure-kubernetes
kubernetes

3 Answers

2/4/2019

If everything is setup correctly, navigating to http://www.13.71.xxx.xxx should take you straight to the application.

What you can do to ensure that the application is functioning properly is to investigate the image and the pod.

For the image you can run it locally using Docker. docker run azure-vote-front image=nameOfImage". If that works then you have established that the image is functioning offline which is a good first step.

Next step is to debug your pod. You can use the command kubectl describe pod azure-vot-front-generated-id-number to get the state of the deployment. If you can't find any errors here either then I'd recommend checking the logs. kubectl logs -f azure-vote-froned-generated-id-number will give you the logs of the application. My guess is that by this step you will have found the error and have been able to remedy it.

The part of your output under PORT(S) shows the mapping of ports inside your clusted. Any request on port 80 on the external-ip will be filtered to port 31619 inside the cluster. Kubernetes has ensured that the request gets filtered back to port 80 for your application when the request reaches your application. As long as you are exposing the port in your Dockerfile it should be just fine.

-- Berimbolinho
Source: StackOverflow

7/9/2019

where is your image stored?

when you configured the K8S yaml file you give it the image location, you need to make sure you have that the service has the credentials for it.

For example, if you are storing it at Azure Container Registry you will need to config the authentication between them to give AKS access to your image Authentication between ACR and AKS cluster for pulling images

To check yourself run kubectl get pods, if you see under status - 'ImagePullBackOff' it means that the action of pulling the image failed. To dig deeper - run kubectl describe pod <your pod name> - Under EVENTS - you will find the error message.

-- apolak
Source: StackOverflow

2/1/2019

You just need to access the address 13.71.xxx.xxx through the browser without the port 31619.

-- Charles Xu
Source: StackOverflow