Skip to main content

Cluster Cleanup

Sleeping resources

To automatically save resources in your cluster, you can configure Okteto Enterprise to automatically scale inactive applications and resources to zero after a period of inactivity.

You can enable and customize the inactivity period via the garbage collector's settings.

Inactive Applications and Resources

Okteto Enterprise considers an application or resources inactive if a user hasn't performed any of the following tasks during the inactivity period:

  • Upgrade or redeploy via the UI or the command line.
  • Launched a development container with okteto up.
  • Pushed the latest version of your code with okteto push.

Service accounts, config maps, secrets, or volumes you create will be unaffected by this operation.

Wake sleeping resources

Okteto's UI will notify you when there are sleeping resources in your namespace. Press the Wake all button to activate all sleeping resources at once.

wake a sleeping resource

Sleeping resources are also started if anyone visits any of the public endpoints of your application.

Persistent resources

In case you are interested on the garbage collector but you want to skip some specific namespace, you can mark it as persistent. To do so, you can add the label dev.okteto.com/persistent to it or use the admin view.

In case you want more granularity and only want to persist specific deployments or statefulsets within a namespace, you can include the label dev.okteto.com/persistent on those resources. In that case, the garbage collector will ignore only those specific resources while scaling down the rest of the namespace.

Delete Unused Namespaces

You can also configure Okteto Enterprise to delete unused namespaces after a period of inactivity. You can enable and customize the inactivity period via the garbage collector's settings.