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,160 points
64 views

1 answer to this question.

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
• 46,040 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
• 46,040 points
1,051 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
• 46,040 points
312 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
• 46,040 points
255 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
3,464 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,920 points
685 views
0 votes
1 answer