Following up on Kubernetes Endpoints with TTL:
Is there a plan to add TTLs to Kubernetes API resources in the future?
If I wanted to try to experiment with adding an optional TTL to the API myself, can somebody help me get started by pointing me to the right place in the code or docs where I should start looking to figure out what I need to change?
I'm assuming that the interface to the underlying storage has TTLs and all I need to change is how the API server could be passed a TTL that I would then forward to the storage. Does that sound right?
You do not need to modify kubernetes to do this.
Here is how to do it yourself.
Here are specific commands to do this for endpoints.
Add an annotation to an endpoint with expiration time one minute from now:
Script to list endpoints, and delete those with expires-at after now:
A pod is a great place to run the above script. It will have automatic access to the API and with a replication controller, it will run forever.