Last active
November 11, 2021 12:22
-
-
Save arajkumar/d337965c92bc674d90aea81d4c7ea6e9 to your computer and use it in GitHub Desktop.
ResourceQuota test
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: v1 | |
kind: Pod | |
metadata: | |
name: low-priority | |
spec: | |
containers: | |
- name: low-priority | |
image: ubuntu | |
command: ["/bin/sh"] | |
args: ["-c", "while true; do echo hello; sleep 10;done"] | |
resources: | |
requests: | |
memory: "10Gi" | |
cpu: "8m" | |
limits: | |
memory: "10Gi" | |
cpu: "8m" | |
priorityClassName: low |
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: scheduling.k8s.io/v1 | |
kind: PriorityClass | |
metadata: | |
name: low | |
value: 10000 | |
globalDefault: false | |
description: "This priority class should be used for XYZ service pods only." |
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: v1 | |
kind: List | |
items: | |
- apiVersion: v1 | |
kind: ResourceQuota | |
metadata: | |
name: pods-high | |
spec: | |
hard: | |
cpu: "1000" | |
memory: 200Gi | |
pods: "10" | |
scopeSelector: | |
matchExpressions: | |
- operator : In | |
scopeName: PriorityClass | |
values: ["high"] | |
- apiVersion: v1 | |
kind: ResourceQuota | |
metadata: | |
name: pods-medium | |
spec: | |
hard: | |
cpu: "10" | |
memory: 20Gi | |
pods: "10" | |
scopeSelector: | |
matchExpressions: | |
- operator : In | |
scopeName: PriorityClass | |
values: ["medium"] | |
- apiVersion: v1 | |
kind: ResourceQuota | |
metadata: | |
name: pods-low | |
spec: | |
hard: | |
requests.cpu: "9m" | |
cpu: "8m" | |
memory: 10Gi | |
pods: "10" | |
scopeSelector: | |
matchExpressions: | |
- operator : In | |
scopeName: PriorityClass | |
values: ["low"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment