Use project rocky and create a quota named rocky-quota with limits for CPU, memory, pods, services, replication controllers, and secrets.
AnswerA
ExplanationSolution:
Ensure the project exists and switch to it:
oc new-project rocky
oc project rocky
Create the quota:
oc create quota rocky-quota \
--hard=limits.cpu=2,limits.memory=1Gi,pods=3,services=6,replicationcontrollers=6,secrets=6
Verify:
oc get resourcequota -n rocky
oc describe quota rocky-quota -n rocky
Notes:
The lab text uses cpu=2,memory=1G and secret=6; in real OpenShift usage, the more reliable forms are limits.cpu, limits.memory, and secrets.
If the exam specifically expects the exact resource names shown in the lab environment, use what the cluster accepts.
This task checks quota enforcement and namespace resource governance.