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

Question: node affinity + zone outage + autoscaling #7314

Open
paymog opened this issue Sep 30, 2024 · 3 comments
Open

Question: node affinity + zone outage + autoscaling #7314

paymog opened this issue Sep 30, 2024 · 3 comments
Labels
area/cluster-autoscaler kind/bug Categorizes issue or PR as related to a bug.

Comments

@paymog
Copy link

paymog commented Sep 30, 2024

Suppose I have a deployment with the following config

affinity:
  nodeAffinity:
    preferredDuringSchedulingIgnoredDuringExecution:
      - weight: 100
        preference:
          matchExpressions:
            - key: topology.kubernetes.io/zone
              operator: In
              values:
                - us-west-2a

Suppose also that:

  1. I'm using the aws autoscaler
  2. I just deployed the above
  3. No existing nodes in my kubernetes cluster can accept the pod because of resource constraints
  4. I have 1 node group per AZ (us-west-2a, 2b, 2c and 2d)

My understanding is that by default the autoscaler will try to scale up the us-west-2a node group to accommodate this new deployment. Is that correct?

Now suppose also that us-west-2a (where this deployments wants to be scheduled) suffers an outage and new nodes cannot come online.

Given this hypothetical outage, will the autoscaler eventually realize it needs to scale up a node in a different AZ?

@paymog paymog added the kind/bug Categorizes issue or PR as related to a bug. label Sep 30, 2024
@adrianmoisey
Copy link
Member

I'm using the aws autoscaler

Is this cluster-autoscaler or Karpenter?

@paymog
Copy link
Author

paymog commented Oct 1, 2024

I'm using the aws autoscaler

Is this cluster-autoscaler or Karpenter?

The cluster autoscaler.

@adrianmoisey
Copy link
Member

/area cluster-autoscaler

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.
Projects
None yet
Development

No branches or pull requests

3 participants