Autokill
Autokill automatically terminates instances or service groups when a configured condition triggers. It helps avoid unnecessary resource usage when instances or groups are no longer needed.
You can configure autokill on:
- Instances: killed after a time, or after reaching a request limit.
- Instance templates: killed if nobody clones them within a specified time.
- Service groups: killed after the group has been empty for a specified time.
Instance autokill
Autokill skips any instance that has a delete lock set. The autokill timer doesn't fire while a delete lock is active.
Kill after stopped duration
Automatically kill an instance after it stops and remains stopped for a given time:
This example kills the instance 1 hour after it stops.
Kill after a request count
Kill an instance after it serves a specified request count:
Updating autokill on a stopped instance
Service group autokill
Automatically kill a service group after it stays empty (no instances) for a given number of milliseconds:
This example kills the service group 5 minutes after its last instance leaves.
Instance template autokill
When you clone an instance from a template, the new instance inherits the autokill configuration.
Automatically kill an instance template if nobody clones it within a given number of milliseconds:
This example removes the template after 24 hours without a clone.
Learn more
- Unikraft Cloud's REST API reference, in particular the sections on instances and services.