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

unable to scale down when pods with pv as ephemeral storage are present #6710

Open
iamKunal opened this issue Apr 15, 2024 · 3 comments
Open
Labels
area/cluster-autoscaler kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@iamKunal
Copy link

Which component are you using?: cluster-autoscaler installed with helm chart

What version of the component are you using?: Chart version: 9.34.0, Image: v1.28.2

Component version:

What k8s version are you using (kubectl version)?:

kubectl version Output
❯  kubectl version
Client Version: v1.28.4
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.6-eks-508b6b3

What environment is this in?: AWS EKS

What did you expect to happen?: Scale down should work fine as the volumes are used as ephemeral store https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes

What happened instead?:
"PersistentVolume and node mismatch for pod" and no matching NodeSelectorTerms and the pod being unable to be rescheduled even when the cluster has capacity.

How to reproduce it (as minimally and precisely as possible):

  • Create deployments with high CPU/memory requests with ephemeral storage backed by persistent volume, so that the cluster scales up to multiple nodes.
  • Decrease the memory/CPU requests

Anything else we need to know?:
The node group is a multi-AZ one, but I have set skip-nodes-with-local-storage=false and also added cluster-autoscaler.kubernetes.io/safe-to-evict: "true" annotation to the pod, but I just get the mismatch error, before I did not received even that properly.

I do not care about the AZ which the pod gets assigned to as the volumes are just used as ephemeral/temporary storage, what I care about is costs, if there are 1 node in each AZ and can be combined to a single node in one of the AZs, it is fine.

Example volume ref:

      volumes:
        - name: pod-ephemeral-storage
          ephemeral:
            volumeClaimTemplate:
              spec:
                storageClassName: ebs-gp3-backed-sc
                accessModes:
                  - ReadWriteOnce
                resources:
                  requests:
                    storage: 128Gi

Since I am using a helm chart to create such a deployment, will creating the persistent volume explicitly with specific labels, and then referring in the volumeClaimTemplate help?

@iamKunal iamKunal added the kind/bug Categorizes issue or PR as related to a bug. label Apr 15, 2024
@mruoss
Copy link

mruoss commented Jun 11, 2024

I think I'm running into the same issue. I have opened an issue over at Kueue but I think this is the correct place to raise it.

kubernetes-sigs/kueue#2389

@adrianmoisey
Copy link
Member

/area cluster-autoscaler

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cluster-autoscaler kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

5 participants