Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize costs on cluster hibernation #859

Open
unmarshall opened this issue Aug 19, 2024 · 0 comments
Open

Optimize costs on cluster hibernation #859

unmarshall opened this issue Aug 19, 2024 · 0 comments
Labels
area/control-plane Control plane related area/cost Cost related kind/enhancement Enhancement, improvement, extension

Comments

@unmarshall
Copy link
Contributor

How to categorize this issue?

/area control-plane
/area cost
/kind enhancement

What would you like to be added:
When a k8s cluster is hibernated then the statefulset is scaled down to 0. What remains are the expensive volumes that were mounted to each of the etcd member pods. In gardener use case this is achieved via hibernation of the shoot resource.
As discussed previously we should do the following upon identifying that an etcd-cluster needs to be hibernated:

  1. Take a full snapshot and upload the same to the backing-store if the backup has been enabled.
  2. Remove the PVCs. This can be done in 2 ways:
    i) Update STS and set PersistentVolumeClaimRetentionPolicy (whenScaled: Delete)and this is then followed by scaling down the STS.
    ii) Scale down STS and then explicitly delete the PVCs

Why is this needed:
Incurring cost for all expensive etcd member volumes for a cluster which has been hibernated is unnecessary. We can achieve cost savings by removing the PVCs while ensuring that these are only removed once a successful full snapshot is taken so that recovering from the last state becomes possible thus eliminating data loss.

@gardener-robot gardener-robot added area/control-plane Control plane related area/cost Cost related kind/enhancement Enhancement, improvement, extension labels Aug 19, 2024
@unmarshall unmarshall changed the title Optimize costs on cluster hibernation requests Optimize costs on cluster hibernation Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/control-plane Control plane related area/cost Cost related kind/enhancement Enhancement, improvement, extension
Projects
None yet
Development

No branches or pull requests

2 participants