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,200 points
80 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
• 51,830 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
• 51,830 points
1,422 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
• 51,830 points
540 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
• 51,830 points
362 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, 2019 in Others by anonymous
5,545 views
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 11, 2019 in Kubernetes by Kalgi
• 51,830 points

reshown Apr 12, 2019 by Kalgi 1,517 views
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,960 points
1,153 views
0 votes
1 answer