Created
December 18, 2021 11:50
-
-
Save tanmay-bhat/8f7777b4846bdb0b173ceb1c6a295c03 to your computer and use it in GitHub Desktop.
Deployment file to distrubute pods inside replicaset to both SPOT and ON_DEMAND instance nodes or node-groups.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kind: Deployment | |
| metadata: | |
| name: nginx | |
| spec: | |
| replicas: 10 | |
| selector: | |
| matchLabels: | |
| app: nginx | |
| template: | |
| metadata: | |
| labels: | |
| app: nginx | |
| spec: | |
| affinity: | |
| nodeAffinity: | |
| preferredDuringSchedulingIgnoredDuringExecution: | |
| - weight: 40 | |
| preference: | |
| matchExpressions: | |
| - key: eks.amazonaws.com/capacityType | |
| operator: In | |
| values: | |
| - SPOT | |
| - weight: 60 | |
| preference: | |
| matchExpressions: | |
| - key: eks.amazonaws.com/capacityType | |
| operator: In | |
| values: | |
| - "ON_DEMAND" | |
| containers: | |
| - image: nginx | |
| name: nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment