Quotas, Limit Ranges for containers, pods & projects (OpenShift Administration Part-9) RedHat Ex280

Limiting the resources consumed by containers, pods, and projects
Applying Quotas, Applying Limit Ranges
......................................
** If new to Docker, Podman, Kubernetes and Openshift then first see -- kzread.info/head/PLnFCwVWiQz4kASpMbCXRmAu6nKtPOBE4Q
** For detail about OpenShift development --
kzread.info/head/PLnFCwVWiQz4lrK7s1S409fsfm59qdFVOX
......................................
commands--
Login as developer
oc new-project schedule-limit
oc create deployment hello-limit --image quay.io/redhattraining/hello-world-nginx:v1.0 --dry-run=client -o yaml gt hello-limit.yaml
resources:
requests:
cpu: "3"
memory: 20Mi
oc apply -f hello-limit.yaml
oc get pods
oc get events --field-selector type=Warning
vim hello-limit.yaml
resources:
requests:
cpu: "1200m"
memory: 20Mi
oc apply -f hello-limit.yaml
oc scale --replicas 4 deployment/hello-limit
oc get pods
oc get events --field-selector type=Warning
oc delete all -l app=hello-limit
vim hello-limit.yaml
resources:
requests:
cpu: "100m"
memory: 20Mi
limits:
cpu: "200m"
memory: 100Mi
--- Applying Quotas on project ---
Login as the admin user
oc create quota project-quota --hard cpu="3",memory="1G",configmaps="2" -n schedule-limit
Login as developer
oc create configmap my-config

Пікірлер: 3

  • @PiyushKushwaha-pyshkshwh
    @PiyushKushwaha-pyshkshwh2 ай бұрын

    Very nicely explained.

  • @prastyadiwahab
    @prastyadiwahab Жыл бұрын

    Hi Sir Why not you used simple command example: the first deploy app then set resources - oc set resources deploy hello-limit --request cpu=1200m,memory=20Mi sorry sir I want to share to shorten the time during the exam not to teach

  • @techtejendra4782

    @techtejendra4782

    Жыл бұрын

    Yes here are always multiple short ways .. in OpenShift also one can do same thing via web console/commands/yaml .. I always try to give background & explanation . for this example also I used yaml to show that resource limit/requests will be configured in either deployment or deployment-config

Келесі