Kubernetes Backend Pods Endpoints are BLANK

2/2/2021

I have deployed a node js Application on K8 1.16 version.I notice that post deployment the backend pods are not registering the end points , The back end pods thus keep restarting and go into CrashLoopBackOff.

 kubectl describe svc
Name:              backend-xx-backend-svc
Namespace:         default
Labels:            <none>
Annotations:       <none>
Selector:          chart=backend-xx-backend,tier=backend
Type:              ClusterIP
IP:                192.168.246.12
Port:              <unset>  80/TCP
TargetPort:        8800/TCP
Endpoints:
Session Affinity:  None
Events:            <none>

Any suggestions as to why the backend pod end points are blank.

-- ptilloo
azure-aks
endpoint
google-kubernetes-engine
kubectl
kubernetes

1 Answer

2/2/2021

As per result of describe command mentioned in the comment, it looks like Readiness probe is failing. Unless a pod is in Ready state, k8s won't forward traffic to that pod; so may be that's why end point in the Service object is blank as none of the pod is in Ready state. Check why Readiness probe i.e. Get 10.39.67.76:8800/api/health is failing. If your app takes time at the start then increase initialDelaySeconds or failureThreshold of Readiness Probe configuration.

-- Rushikesh
Source: StackOverflow