Jaydeep Soni
Jaydeep Soni

Reputation: 548

AKS Service does not have any active Endpoint

These are details from Azure AKS

I am getting 404 on website and in the backend nginx ingress pods getting this log

Service "ns-2/svc-test-2" does not have any active Endpoint

This is liferay application running on the pod.

Ingress describe

Name:             ingress-abc-2
Namespace:        ns-abc-2
Address:          1.1.1.1
Default backend:  default-http-backend:80 (<error: endpoints "default-http-backend" not found>)
TLS:
  secret-tls-abc-2 terminates aks.abc.in
Rules:
  Host             Path  Backends
  ----             ----  --------
  aks.abc.in
                   /   svc-abc-2:80 (10.244.0.23:8080)
Annotations:       kubernetes.io/ingress.class: nginx
                   nginx.ingress.kubernetes.io/ssl-redirect: true
Events:            <none>

service describe

Name:              svc-abc-2
Namespace:         ns-abc-2
Labels:            <none>
Annotations:       service.beta.kubernetes.io/azure-load-balancer-internal: true
Selector:          app=pod-abc-2
Type:              ClusterIP
IP Family Policy:  SingleStack
IP Families:       IPv4
IP:                10.0.162.112
IPs:               10.0.162.112
Port:              port-abc-2  80/TCP
TargetPort:        8080/TCP
Endpoints:         10.244.0.23:8080
Session Affinity:  None
Events:            <none>

kubectl get po -n ns-2 -o wide

NAME                                           READY   STATUS    RESTARTS   AGE    IP            NODE                                NOMINATED NODE   READINESS GATES
pod-abc-2-1111   1/1     Running   0          103m   10.244.0.23   aks-agentpool-1111-vmss000000   <none>           <none>

kubectl describe po -n ns-2 pod-abc-2-1111

Namespace:    ns-abc-2
Priority:     0
Node:         aks-agentpool-1111-vmss000000/10.224.0.4
Start Time:   Thu, 18 Aug 2022 18:23:09 +0530
Labels:       app=pod-abc-2
              pod-template-hash=5d774586b5

Status:       Running
IP:           10.244.0.23
IPs:
  IP:           10.244.0.23

Deployment describe

Name:                   deployment-abc-2
Namespace:              ns-abc-2
CreationTimestamp:      Thu, 18 Aug 2022 18:23:09 +0530
Labels:                 app=deployment-canopi-liferay-2
Annotations:            deployment.kubernetes.io/revision: 1
Selector:               app=pod-abc-2

Selectors and Labels are properly selected.

If I go inside pod and run curl localhost:8080 then I get the response of welcome page.

Endpoints

kubectl get endpoints -n ns-abc-2
NAME                   ENDPOINTS          AGE
svc-abc-2   10.244.0.23:8080   148m

Enpoints ingress controller

kubectl get endpoints -n ns-ingress-2
NAME                                                          ENDPOINTS                                                    AGE
nginx-ingress-controller-ingress-nginx-controller             10.244.0.20:443,10.244.0.21:443,10.244.0.20:80 + 1 more...   144m
nginx-ingress-controller-ingress-nginx-controller-admission   10.244.0.20:8443,10.244.0.21:8443                            144m

Upvotes: 0

Views: 840

Answers (1)

Jaydeep Soni
Jaydeep Soni

Reputation: 548

Ok, so this issue is resolved.

In my nginx controller I was pointing application on DNS name and I was trying to open application using public IP of controller until DNS-PublicIP mapped in which I was getting 404.

After DNS-PublicIP have mapped, application is started showing on website DNS based URL.

Upvotes: 1

Related Questions