How come my kubernetes' service can't find an endpoint? How come my kubernetes' service can't find an endpoint? kubernetes kubernetes

How come my kubernetes' service can't find an endpoint?


Extra thing to check for.

Endpoints are only created if your deployment is considered healthy. If you have defined your readinessProbe incorrectly (mea culpa) or the deployment does not react to it correctly, an endpoint will not be created.


A few things look funny to me, with the first two being most important:

  1. It looks like the service doesn't exist. Are you sure it was created properly? Does it show up when you run kubectl get svc?
  2. The selector on your service doesn't look right. The selector should be key-value label pairs that match those in the replication controller's template. The label in your rc template is name: "rediscontroller", so you should use that as your service selector as well.
  3. What's the id field at the start of each object? It doesn't look like that's a valid field in v1beta3.


For you particular case, make sure the service spec has a containerPort if you specified it in your Pod spec. See details: http://kubernetes.io/docs/user-guide/debugging-services/#my-service-is-missing-endpoints

Otherwise please setup through the official K8s service debugging guide:

http://kubernetes.io/docs/user-guide/debugging-services/

It has a step-by-step checklist of things to look out to from service to DNS to networking to kube proxy etc.