mirror of
https://github.com/wardviaene/kubernetes-course.git
synced 2026-07-10 14:19:31 +00:00
resourcequotas
This commit is contained in:
14
resourcequotas/defaults.yml
Normal file
14
resourcequotas/defaults.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: LimitRange
|
||||
metadata:
|
||||
name: limits
|
||||
namespace: myspace
|
||||
spec:
|
||||
limits:
|
||||
- default:
|
||||
cpu: 200m
|
||||
memory: 512Mi
|
||||
defaultRequest:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
type: Container
|
||||
18
resourcequotas/helloworld-no-quotas.yml
Normal file
18
resourcequotas/helloworld-no-quotas.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: helloworld-deployment
|
||||
namespace: myspace
|
||||
spec:
|
||||
replicas: 3
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: helloworld
|
||||
spec:
|
||||
containers:
|
||||
- name: k8s-demo
|
||||
image: wardviaene/k8s-demo
|
||||
ports:
|
||||
- name: nodejs-port
|
||||
containerPort: 3000
|
||||
25
resourcequotas/helloworld-with-quotas.yml
Normal file
25
resourcequotas/helloworld-with-quotas.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: helloworld-deployment
|
||||
namespace: myspace
|
||||
spec:
|
||||
replicas: 3
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: helloworld
|
||||
spec:
|
||||
containers:
|
||||
- name: k8s-demo
|
||||
image: wardviaene/k8s-demo
|
||||
ports:
|
||||
- name: nodejs-port
|
||||
containerPort: 3000
|
||||
resources:
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 0.5Gi
|
||||
limits:
|
||||
cpu: 400m
|
||||
memory: 1Gi
|
||||
30
resourcequotas/resourcequota.yml
Normal file
30
resourcequotas/resourcequota.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: myspace
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ResourceQuota
|
||||
metadata:
|
||||
name: compute-quota
|
||||
namespace: myspace
|
||||
spec:
|
||||
hard:
|
||||
requests.cpu: "1"
|
||||
requests.memory: 1Gi
|
||||
limits.cpu: "2"
|
||||
limits.memory: 2Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ResourceQuota
|
||||
metadata:
|
||||
name: object-quota
|
||||
namespace: myspace
|
||||
spec:
|
||||
hard:
|
||||
configmaps: "10"
|
||||
persistentvolumeclaims: "4"
|
||||
replicationcontrollers: "20"
|
||||
secrets: "10"
|
||||
services: "10"
|
||||
services.loadbalancers: "2"
|
||||
Reference in New Issue
Block a user