-
Notifications
You must be signed in to change notification settings - Fork 1
/
nginx-pod-requirements.yaml
34 lines (32 loc) · 1.34 KB
/
nginx-pod-requirements.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- image: nginx:latest
name: nginx
resources:
requests:
cpu: "1"
memory: "512m"
limits:
cpu: "1"
memory: "1024m"
# controlplane $ kubectl create -f nginx-pod-requirements.yaml --namespace=team-awesome
# pod/nginx created
# controlplane $ kubectl describe resourcequota team-awesome-quota --namespace=team-awesome
# Name: team-awesome-quota
# Namespace: team-awesome
# Resource Used Hard
# -------- ---- ----
# limits.cpu 1 4
# limits.memory 1024m 4096m
# pods 1 2
# requests.cpu 1 1
# requests.memory 512m 1024m
# controlplane $ kubectl create -f nginx-pod-requirements.yaml --namespace=team-awesome
# Error from server (Forbidden): error when creating "nginx-pod-requirements.yaml": pods "nginx" is forbidden: exceeded quota: team-awesome-quota, requested: requests.cpu=1, used: requests.cpu=1, limited: requests.cpu=1
# controlplane $ kubectl create -f nginx-pod-requirements2.yaml --namespace=team-awesome
# Error from server (Forbidden): error when creating "nginx-pod-requirements2.yaml": pods "nginx" is forbidden: exceeded quota: team-awesome-quota, requested: requests.cpu=1, used: requests.cpu=1, limited: requests.cpu=1
# controlplane $