Scheduling PODs Flashcards
Set requests and limits for a deployment
oc set resources deployment hello-world-nginx –requests cpu=10m,memory=20Mi –limits cpu=80m,memory=100Mi
Show resources consumed by a pod
oc adm top pods
shows actual usage for one or more nodes in the cluster
oc adm top nodes -l node-role.kubernetes.io/worker
List of resources that a quota can restrict by their count or number
- pods
- replicationcontrollers
- controllers
- services
- secrets
- persistentvolumeclaims
compute resources that can be restricted by a quota
- requests.cpu
- requests.memory
- requests.storage
create a resource quota is by using the oc
oc create quota dev-quota –hard services=10,cpu=1300m,memory=1.5Gi
create resource quota from file
oc create –save-config -f dev-quota.ym
Resource quota CR
list available quotas
oc get resourcequota
displays the cumulative limits set for all ResourceQuota
oc describe quota
Delete quota
oc delete resourcequota QUOTA
create a limit range resource from a YAML
oc create –save-config -f dev-limits.yml
view the limit constraints enforced in a project
oc describe limitrange dev-limits
Delete limit range
oc delete limitrange dev-limits
create a cluster quota for all projects owned by qa user
oc create clusterquota user-qa –project-annotation-selector openshift.io/requester=qa –hard pods=12,secrets=20