-
-
Save klingklangdev/ab08dbed56cb4a758ea49bc6ac07676d to your computer and use it in GitHub Desktop.
Node Affinity | CKA Exam Course
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
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: pref | |
| spec: | |
| selector: | |
| matchLabels: | |
| app: pref | |
| replicas: 5 | |
| template: | |
| metadata: | |
| labels: | |
| app: pref | |
| spec: | |
| affinity: | |
| nodeAffinity: | |
| preferredDuringSchedulingIgnoredDuringExecution: | |
| - weight: 80 | |
| preference: | |
| matchExpressions: | |
| - key: availability-zone | |
| operator: In | |
| values: | |
| - zone1 | |
| - weight: 20 | |
| preference: | |
| matchExpressions: | |
| - key: share-type | |
| operator: In | |
| values: | |
| - dedicated | |
| containers: | |
| - args: | |
| - sleep | |
| - "99999" | |
| image: busybox | |
| name: main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment