Kubernetes Endpoints with TTL

0 votes
I have a Kubernetes service without a selector. I want to manually manage the Endpoints by having the endpoint servers register themselves.

Is there a way to specify a TTL for Endpoints when I POST them to the Kubernetes API server, so that they will timeout and be deleted automatically if my endpoint server terminates and stops heartbeating?
Aug 27, 2018 in Kubernetes by lina
• 8,100 points
31 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Follow these steps:

  1. add an annotation to each object that you want to have a TTL. The annotation can say when it should expire. You can pick the name and format of this annotation.
  2. update the annotation each time you update the object.
  3. run another process that repeatedly lists all the objects of a given type and deletes ones that need to expire
answered Aug 27, 2018 by Kalgi
• 35,750 points

Related Questions In Kubernetes

0 votes
1 answer

Kubernetes endpoints showing "ServiceUnavailable"

Those URLs are incomplete. Influx's ports are ...READ MORE

answered Sep 6, 2018 in Kubernetes by Kalgi
• 35,750 points
372 views
0 votes
1 answer

Kubernetes Ingress Path only works with /

Have you changed the context path in ...READ MORE

answered Sep 7, 2018 in Kubernetes by Kalgi
• 35,750 points
153 views
0 votes
1 answer

Issue with Kubernetes ingress routing to Nextjs applications

You’re using nginx ingress controller which does ...READ MORE

answered Sep 11, 2018 in Kubernetes by Kalgi
• 35,750 points
77 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17 in Others by anonymous
471 views
+3 votes
1 answer
0 votes
2 answers

DNS does not resolve with NGINX in Kubernetes

adding to @kalgi's answer Using just the hostname ...READ MORE

answered Aug 30, 2018 in Kubernetes by Nilesh
• 6,900 points
218 views
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.