This commit is contained in:
sandervanvugt 2022-11-15 13:03:45 +01:00
parent d141011664
commit e606a7c383
4 changed files with 48 additions and 4 deletions

13
limitedpod.yaml Normal file
View File

@ -0,0 +1,13 @@
apiVersion: v1
kind: Pod
metadata:
name: limitedpod
spec:
containers:
- name: demo
image: registry.k8s.io/pause:2.0
resources:
requests:
cpu: 700m
limits:
cpu: 700m

14
limitrange.yaml Normal file
View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: LimitRange
metadata:
name: cpulimits
spec:
limits:
- default:
cpu: 500m
defaultRequest:
cpu: 500m
max:
cpu: "1"
min:
cpu: 100m

View File

@ -1,15 +1,16 @@
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
name: nginx-toleration name: nginx-ssd
labels: labels:
env: test env: test
spec: spec:
containers: containers:
- name: nginx-toleration - name: nginx-ssd
image: nginx image: nginx
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
tolerations: tolerations:
- key: "example-key" - key: "storage"
operator: "Exists" operator: "Equals"
value: "ssd"
effect: "NoSchedule" effect: "NoSchedule"

16
taint-toleration2.yaml Normal file
View File

@ -0,0 +1,16 @@
apiVersion: v1
kind: Pod
metadata:
name: nginx-hdd
labels:
env: test
spec:
containers:
- name: nginx-hdd
image: nginx
imagePullPolicy: IfNotPresent
tolerations:
- key: "storage"
operator: "Equals"
value: "hdd"
effect: "NoSchedule"