RedHat EX280 Actual Free Exam Questions & Community Discussion
Configure limits
Configure your OpenShift cluster to use limits in the bluebook project with the following requirements:
The name of the LimitRange resource is: ex280-limits
The amount of memory consumed by a single pod is between 5Mi and 300Mi The amount of memory consumed by a single container is between 5Mi and
300Mi with a default request value of 100Mi
The amount of CPU consumed by a single pod is between 10m and 500m
The amount of CPU consumed by a single container is between 10m and 500m with a default request value of
100m
Configure your OpenShift cluster to use limits in the bluebook project with the following requirements:
The name of the LimitRange resource is: ex280-limits
The amount of memory consumed by a single pod is between 5Mi and 300Mi The amount of memory consumed by a single container is between 5Mi and
300Mi with a default request value of 100Mi
The amount of CPU consumed by a single pod is between 10m and 500m
The amount of CPU consumed by a single container is between 10m and 500m with a default request value of
100m
Correct Answer:
See the solution below in Explanation.
Explanation:
Solution:
$ vim limit.yaml
# Edit the yaml file like below mentioned
apiVersion: "v1" kind: "LimitRange" metadata:
name: "resource-limits" spec:
limits:
- type: "Pod"
max:
cpu: "500m" memory: "300Mi"
min:
cpu: "10m" memory: "5Mi"
- type: "Container" max:
cpu: "500m" memory: "300Mi"
min:
cpu: "10m" memory: "5Mi"
defaultRequest: cpu: "100m" memory: "100Mi"
$ oc create -f limit.yaml --save-config -n bluebook
$ oc describe limitranges -n bluebook
Explanation:
Solution:
$ vim limit.yaml
# Edit the yaml file like below mentioned
apiVersion: "v1" kind: "LimitRange" metadata:
name: "resource-limits" spec:
limits:
- type: "Pod"
max:
cpu: "500m" memory: "300Mi"
min:
cpu: "10m" memory: "5Mi"
- type: "Container" max:
cpu: "500m" memory: "300Mi"
min:
cpu: "10m" memory: "5Mi"
defaultRequest: cpu: "100m" memory: "100Mi"
$ oc create -f limit.yaml --save-config -n bluebook
$ oc describe limitranges -n bluebook
Create Resource Quota for Project Rocky
Task information Details:
Use project rocky and create a quota named rocky-quota with limits for CPU, memory, pods, services, replication controllers, and secrets.
Task information Details:
Use project rocky and create a quota named rocky-quota with limits for CPU, memory, pods, services, replication controllers, and secrets.
Correct Answer:
See the solution below in Explanation.
Explanation:
Solution:
* 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.
Explanation:
Solution:
* 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.
Create Secret with Name Magic in Math Project
Task information Details:
Create a secret named magic in the math project that stores MYSQL_ROOT_PASSWORD=redhat .
Task information Details:
Create a secret named magic in the math project that stores MYSQL_ROOT_PASSWORD=redhat .
Correct Answer:
See the solution below in Explanation.
Explanation:
Solution:
* Switch to the math project:
oc project math
* Create the secret:
oc create secret generic magic --from-literal=MYSQL_ROOT_PASSWORD=redhat
* Verify:
oc get secret magic
oc describe secret magic
Note:
* The uploaded lab text contains a typo --from-listeral; the valid option is --from-literal.
* The output in the lab also appears inconsistent. The intended secret name is magic .
This task checks secret creation and secure configuration data handling.
Explanation:
Solution:
* Switch to the math project:
oc project math
* Create the secret:
oc create secret generic magic --from-literal=MYSQL_ROOT_PASSWORD=redhat
* Verify:
oc get secret magic
oc describe secret magic
Note:
* The uploaded lab text contains a typo --from-listeral; the valid option is --from-literal.
* The output in the lab also appears inconsistent. The intended secret name is magic .
This task checks secret creation and secure configuration data handling.
Autoscale of Pods
Task information Details:
Create an HPA for httpd with min=2 , max=9 , and CPU target 60% .
Set resource requests on the httpd deployment so autoscaling can function properly.
Task information Details:
Create an HPA for httpd with min=2 , max=9 , and CPU target 60% .
Set resource requests on the httpd deployment so autoscaling can function properly.
Correct Answer:
See the solution below in Explanation.
Explanation:
Solution:
* Set resource requests on the deployment:
oc set resources deployment httpd --requests=cpu=50m,memory=100Mi
* Create the HPA:
oc autoscale deployment httpd --min=2 --max=9 --cpu-percent=60
* Verify:
oc get hpa
oc describe hpa httpd
oc get deployment httpd -o yaml
Why resource requests matter:
* HPA CPU utilization is calculated against requested CPU.
* Without requests, percentage-based autoscaling is incomplete or invalid.
This task focuses on autoscaling prerequisites and policy creation.
Explanation:
Solution:
* Set resource requests on the deployment:
oc set resources deployment httpd --requests=cpu=50m,memory=100Mi
* Create the HPA:
oc autoscale deployment httpd --min=2 --max=9 --cpu-percent=60
* Verify:
oc get hpa
oc describe hpa httpd
oc get deployment httpd -o yaml
Why resource requests matter:
* HPA CPU utilization is calculated against requested CPU.
* Without requests, percentage-based autoscaling is incomplete or invalid.
This task focuses on autoscaling prerequisites and policy creation.
0
0
0
10
