最新的RedHat Red Hat Certified Specialist in OpenShift Administration - EX280免費考試真題
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.
正確答案:
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
Configure a service account
Configure a service account in the apples project to meet the following requirements:
The name of the account is ex280sa
The account allows pods to be run as any available user
Configure a service account in the apples project to meet the following requirements:
The name of the account is ex280sa
The account allows pods to be run as any available user
正確答案:
See the solution below in Explanation.
Explanation:
Solution:
$ oc project apples
$ oc create sa ex280sa
$ oc adm policy add-scc-to-user anyuid -z ex280sa
Explanation:
Solution:
$ oc project apples
$ oc create sa ex280sa
$ oc adm policy add-scc-to-user anyuid -z ex280sa
Deploy an application
Deploy the application called rocky in the bullwinkle project so that the following conditions are true:
The
application is reachable at the following address: http://rocky.apps.domainXX.example.com The application produces output
Deploy the application called rocky in the bullwinkle project so that the following conditions are true:
The
application is reachable at the following address: http://rocky.apps.domainXX.example.com The application produces output
正確答案:
See the solution below in Explanation.
Explanation:
Solution:
$ oc project bullwinkle
$ oc get pods
$ oc get all | grep deploy
$ oc get nodes
$ oc describe nodes | grep -i taint
$ oc adm taint nodes worker0 key1=value1:NoSchedule-
$ oc adm taint nodes worker1 key1=value1:NoSchedule-
$ oc describe nodes | grep -i taint
$ oc get route
$ oc delete route rocky
$ oc expose svc rocky --hostname rocky.apps.domainxx.example.com
$ oc get route
Explanation:
Solution:
$ oc project bullwinkle
$ oc get pods
$ oc get all | grep deploy
$ oc get nodes
$ oc describe nodes | grep -i taint
$ oc adm taint nodes worker0 key1=value1:NoSchedule-
$ oc adm taint nodes worker1 key1=value1:NoSchedule-
$ oc describe nodes | grep -i taint
$ oc get route
$ oc delete route rocky
$ oc expose svc rocky --hostname rocky.apps.domainxx.example.com
$ oc get route
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
正確答案:
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