Skip to content

Commit 0bea220

Browse files
Update Sunlife_Notes
1 parent b6fd44d commit 0bea220

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

Sunlife_Notes

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,4 +1091,76 @@ curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s http
10911091

10921092
kubectl --kubeconfig config get pods -n finance
10931093

1094+
-----------------------Resource Quota------------------
1095+
By Raman
1096+
A resource quota, defined by a ResourceQuota object, provides constraints that limit aggregate resource consumption per namespace. It can limit the quantity of objects that can be created in a namespace by type, as well as the total amount of compute resources that may be consumed by resources in that project.
1097+
1098+
LAB
1099+
1100+
apiVersion: v1
1101+
1102+
kind: ResourceQuota
1103+
1104+
metadata:
1105+
1106+
name: quota-demo1
1107+
1108+
namespace: quota-demo-ns
1109+
1110+
spec:
1111+
1112+
hard:
1113+
1114+
pods: "2"
1115+
1116+
1117+
configmaps: "1"
1118+
1119+
1120+
1121+
#2
1122+
1123+
apiVersion: v1
1124+
1125+
kind: ResourceQuota
1126+
1127+
metadata:
1128+
1129+
name: quota-demo-mem
1130+
1131+
namespace: quota-demo-ns
10941132

1133+
spec:
1134+
1135+
hard:
1136+
1137+
1138+
limits.memory: "500Mi"
1139+
1140+
1141+
1142+
apiVersion: v1
1143+
1144+
kind: Pod
1145+
1146+
metadata:
1147+
1148+
name: mem-limit
1149+
1150+
namespace: quota-demo-ns
1151+
1152+
spec:
1153+
1154+
containers:
1155+
1156+
- name: memlimit
1157+
1158+
image: nginx
1159+
1160+
resources:
1161+
1162+
limits:
1163+
1164+
1165+
memory: "200Mi"
1166+
-------------------------------------------------------

0 commit comments

Comments
 (0)