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

No documentation for multiple affinity for Spot/On-Demand #2760

Closed
nitrag opened this issue Jan 21, 2020 · 2 comments
Closed

No documentation for multiple affinity for Spot/On-Demand #2760

nitrag opened this issue Jan 21, 2020 · 2 comments

Comments

@nitrag
Copy link
Contributor

nitrag commented Jan 21, 2020

I can't find any documentation to be able to support multiple autoscaling groups for a single pod with priority. The use case is to attempt scale up with spot instances (Spot ASG) and if that fails (lack of capacity), have a fallback ASG (On-Demand). I see the work at #2235 but can't conceptualize the relationship to the pod config and how cluster-autoscaler works.

Would having:

Two AWS AutoScaling Groups, with near-identical Launch templates except for the spot config.

  • zeroscaling-gpu-accelerated-p2-xlarge-spot
 --kubelet-extra-args '--node-labels=nodepool=zeroscaling-gpu-accelerated-p2-xlarge-spot --register-with-taints=specialized=true:NoExecute
  • zeroscaling-gpu-accelerated-p2-xlarge
 --kubelet-extra-args '--node-labels=nodepool=zeroscaling-gpu-accelerated-p2-xlarge --register-with-taints=specialized=true:NoExecute

and this Affinity spec work?

spec:
  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
        - matchExpressions:
          - key: nodepool
            operator: In
            values:
            - zeroscaling-gpu-accelerated-p2-xlarge-spot
            - zeroscaling-gpu-accelerated-p2-xlarge
      preferredDuringSchedulingIgnoredDuringExecution:
      - weight: 1
        preference:
          matchExpressions:
          - key: nodepool
            operator: Equals
            value: zeroscaling-gpu-accelerated-p2-xlarge-spot
  tolerations:
    - key: specialized
      operator: Exists
@nitrag
Copy link
Contributor Author

nitrag commented Jan 22, 2020

@piontec any thoughts/help here based upon your work for #2235 ? Or an example how you are handling it?

@nitrag
Copy link
Contributor Author

nitrag commented Jan 29, 2020

@nitrag nitrag closed this as completed Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant