cloudacademy / aks-voteapp-demo

Azure AKS VoteApp Demo
9 stars 36 forks source link

Issue with STEP 7.5 #3

Closed danielecazzari closed 4 years ago

danielecazzari commented 4 years ago

Hi,

I'm having issue displaying the frontend portal. To be more specific if I run: curl -s -i $FRONTEND_PUBLIC_FQDN this is the result:

HTTP/1.1 404 Not Found
Server: nginx/1.19.1
Date: Thu, 20 Aug 2020 11:34:52 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 21
Connection: keep-alive

default backend - 404

I tried to navigate logs but didn't found any obvious issue. All pods are running:

NAME                       READY   STATUS    RESTARTS   AGE
api-f44858555-4w9cs        1/1     Running   0          59m
api-f44858555-khcw2        1/1     Running   0          59m
api-f44858555-lx6br        1/1     Running   0          59m
api-f44858555-spj79        1/1     Running   0          59m
frontend-d5dbcf48d-2fccn   1/1     Running   0          57m
frontend-d5dbcf48d-jh2vl   1/1     Running   0          57m
frontend-d5dbcf48d-ncktp   1/1     Running   0          57m
frontend-d5dbcf48d-p47hl   1/1     Running   0          57m
mongo-0                    1/1     Running   0          81m
mongo-1                    1/1     Running   0          81m
mongo-2                    1/1     Running   0          80m

Thanks a lot

Daniele

PS: Note I have some issues with nip.io since it's blocked by my company policy. I'm currently using Azure Cloud Shell and a private PC to access it but I wonder if there are alternative solutions.

jeremycook123 commented 4 years ago

Hi Daniele

Should be fairly simple to fix -but will need more details pls - send me yr updated info to jeremy.cook@cloudacademy.com and I will try and troubleshoot this for you.

In your environment what is the value of $FRONTEND_PUBLIC_FQDN - to determine this rerun the following:

kubectl get svc aks-nginx-ingress-controller -n nginx-ingress -o json

INGRESS_PUBLIC_IP=$(kubectl get svc aks-nginx-ingress-controller -n nginx-ingress -o=jsonpath='{.status.loadBalancer.ingress[0].ip}')

echo INGRESS_PUBLIC_IP: $INGRESS_PUBLIC_IP

API_PUBLIC_FQDN=api.$INGRESS_PUBLIC_IP.nip.io
FRONTEND_PUBLIC_FQDN=frontend.$INGRESS_PUBLIC_IP.nip.io

echo API_PUBLIC_FQDN: $API_PUBLIC_FQDN
echo FRONTEND_PUBLIC_FQDN: $FRONTEND_PUBLIC_FQDN
jeremycook123 commented 4 years ago

Problem resolved - the Ingress resource for the frontend was recreated