RedHat EX280 Actual Free Exam Questions & Community Discussion
Scale an application manually
Manually scale the minion application in the gru project to a total of 5 replicas.
Manually scale the minion application in the gru project to a total of 5 replicas.
Correct Answer:
See the solution below in Explanation.
Explanation:
Solution:
$ oc project gru
$ oc get pods
$ oc get all | grep deployment
$ oc scale --replicas=5 deployment.apps/minion
$ oc get pods
Explanation:
Solution:
$ oc project gru
$ oc get pods
$ oc get all | grep deployment
$ oc scale --replicas=5 deployment.apps/minion
$ oc get pods
Scale an application automatically
Automatically scale the hydra application deployment configuration in the lerna project with the following requirements:
Minimum number of replicas: 6 Maximum number of replicas: 9
Target average CPU utilization: 60 percent Container CPU resource request: 25m Container CPU resource limit: 100m
Automatically scale the hydra application deployment configuration in the lerna project with the following requirements:
Minimum number of replicas: 6 Maximum number of replicas: 9
Target average CPU utilization: 60 percent Container CPU resource request: 25m Container CPU resource limit: 100m
Correct Answer:
See the solution below in Explanation.
Explanation:
Solution:
$ oc project lerna
$ oc get pods
$ oc get all | grep deployment
$ oc autoscale deployment.apps/hydra --max=9 --min=6 --cpu-percent=60
$ oc get hpa
$ oc set resources deployment.apps/hydra --limits=cpu=100m -- requests=cpu=25m
$ oc describe deployment.apps/hydra | grep Limits -A3
Explanation:
Solution:
$ oc project lerna
$ oc get pods
$ oc get all | grep deployment
$ oc autoscale deployment.apps/hydra --max=9 --min=6 --cpu-percent=60
$ oc get hpa
$ oc set resources deployment.apps/hydra --limits=cpu=100m -- requests=cpu=25m
$ oc describe deployment.apps/hydra | grep Limits -A3
Create Project Template
Task information Details:
Generate the bootstrap project template, create it in openshift-config , update the cluster project configuration to use the template, and create a new project to validate it.
Task information Details:
Generate the bootstrap project template, create it in openshift-config , update the cluster project configuration to use the template, and create a new project to validate it.
Correct Answer:
See the solution below in Explanation.
Explanation:
Solution:
* Generate the default template:
oc adm create-bootstrap-project-template -o yaml > template.yaml
* Review and edit template.yaml if required.
* Create the template in openshift-config:
oc create -f template.yaml -n openshift-config
* Edit the cluster project configuration:
oc edit project.config.openshift.io/cluster
* Add or update:
spec:
projectRequestTemplate:
name: project-request
* Save and exit.
* Create a test project:
oc new-project test123
* Verify the template behavior:
oc get project test123 -o yaml
Notes:
* The uploaded lab text shows projects.config.openshift.io cluster-admin; the standard resource is project.
config.openshift.io/cluster.
This task checks cluster-wide customization of new-project creation behavior.
Explanation:
Solution:
* Generate the default template:
oc adm create-bootstrap-project-template -o yaml > template.yaml
* Review and edit template.yaml if required.
* Create the template in openshift-config:
oc create -f template.yaml -n openshift-config
* Edit the cluster project configuration:
oc edit project.config.openshift.io/cluster
* Add or update:
spec:
projectRequestTemplate:
name: project-request
* Save and exit.
* Create a test project:
oc new-project test123
* Verify the template behavior:
oc get project test123 -o yaml
Notes:
* The uploaded lab text shows projects.config.openshift.io cluster-admin; the standard resource is project.
config.openshift.io/cluster.
This task checks cluster-wide customization of new-project creation behavior.
Configure a secret
Configure a secret in the math project with the following requirements: The name of the secret is: magic The secret defines a key with name: decoder_ring The secret defines the key with value:
XpWy9KdcP3Tr9FFHGQgZgVRCKukQdrQsbcl0c2ZYhDk=
Configure a secret in the math project with the following requirements: The name of the secret is: magic The secret defines a key with name: decoder_ring The secret defines the key with value:
XpWy9KdcP3Tr9FFHGQgZgVRCKukQdrQsbcl0c2ZYhDk=
Correct Answer:
See the solution below in Explanation.
Explanation:
Solution:
$ oc project math
$ oc create secret generic magic --from-literal key=decoder_ring --from- literal value=XpWy9KdcP3Tr9FFHGQgZgVRCKukQdrQsbcl0c2ZYhDk=
$ oc get secret -n math
Explanation:
Solution:
$ oc project math
$ oc create secret generic magic --from-literal key=decoder_ring --from- literal value=XpWy9KdcP3Tr9FFHGQgZgVRCKukQdrQsbcl0c2ZYhDk=
$ oc get secret -n math
0
0
0
10
