Topic: OpenShift in IT Infrastructure · Certification preparation
Learning path: OpenShift Administrator, lesson 8 of 13
Quick answer: EX280 is Red Hat's hands-on OpenShift administration exam, which earns the Red Hat Certified System Administrator in OpenShift credential. It is graded on the final state of a live cluster, so the best practice is to perform real tasks: projects and RBAC, deployments, routes, storage, secrets, quotas, network policies and troubleshooting. The labs below are original tasks mapped to the public objective areas. Red Hat notes that more than one exam version can be in use, so confirm yours in its Learning Management System.
Key takeaways
- EX280 is performance-based; marks come from the end state of the cluster.
- Practise each task until it works without notes and survives a pod restart.
- Avoid exam dumps; sharing real items breaks Red Hat's exam agreement.
- Check your exam version and objectives in Red Hat's learning portal.
- Learn
oc explain and --dry-run=client -o yaml to work fast.
Table of Contents
How Do You Set Up a Practice Cluster?
Use OpenShift Local (formerly CodeReady Containers) on a workstation with enough memory, or the Red Hat Developer Sandbox for short sessions. Cluster-admin tasks such as identity providers need OpenShift Local or a lab cluster.
crc setup
crc start
eval $(crc oc-env)
oc login -u kubeadmin https://api.crc.testing:6443
oc whoami; oc get nodes
Projects, Users and RBAC
| # | Task | Check |
| 1 | Create project finance with display name Finance Apps | oc get project finance |
| 2 | Add users with an HTPasswd identity provider | oc login -u alice |
| 3 | Give alice the edit role in finance | oc auth can-i create deploy -n finance --as alice |
| 4 | Create group auditors with view access | oc get rolebinding -n finance |
| 5 | Stop regular users from creating projects | Login as alice and try oc new-project x |
htpasswd -c -B -b users.htpasswd alice Redhat123
htpasswd -B -b users.htpasswd bob Redhat123
oc create secret generic htpass-secret --from-file=htpasswd=users.htpasswd -n openshift-config
oc edit oauth cluster # add an HTPasswd identityProvider referencing htpass-secret
oc new-project finance --display-name="Finance Apps"
oc policy add-role-to-user edit alice -n finance
oc adm groups new auditors bob
oc policy add-role-to-group view auditors -n finance
oc adm policy remove-cluster-role-from-group self-provisioner system:authenticated:oauth
Deploying and Exposing Applications
| # | Task | Check |
| 6 | Deploy an httpd image as web | oc get pods -l app=web |
| 7 | Expose it with a route on a given hostname | curl the route |
| 8 | Create an edge TLS route | curl -k https://... |
| 9 | Roll out a new image and roll back | oc rollout history deploy/web |
| 10 | Add readiness and liveness probes | oc describe pod |
oc create deployment web --image=registry.access.redhat.com/ubi9/httpd-24 -n finance
oc expose deployment web --port=8080
oc expose service web --hostname=web.apps-crc.testing
oc create route edge web-tls --service=web --hostname=secure.apps-crc.testing
oc set probe deploy/web --readiness --get-url=http://:8080/ --initial-delay-seconds=5
oc rollout undo deploy/web
Configuration, Secrets and Storage
| # | Task | Check |
| 11 | Create a ConfigMap and inject it as environment variables | oc rsh then env |
| 12 | Store a database password in a Secret | oc get secret -o yaml |
| 13 | Request a 1 GiB PVC and mount it at /data | PVC shows Bound |
| 14 | Prove data survives a pod deletion | Write a file, delete pod, read again |
oc create configmap web-cfg --from-literal=MODE=prod
oc set env deploy/web --from=configmap/web-cfg
oc create secret generic db-cred --from-literal=password=S3cret
oc set env deploy/web --from=secret/db-cred
oc set volume deploy/web --add --name=data --type=pvc --claim-name=web-data \
--claim-size=1Gi --mount-path=/data
Quotas, Limits and Scaling
| # | Task | Check |
| 15 | Limit the project to 4 pods and 2 CPU | oc describe quota |
| 16 | Set default container limits with a LimitRange | New pod shows limits |
| 17 | Scale to 3 replicas | oc get deploy web |
| 18 | Autoscale between 2 and 5 at 70% CPU | oc get hpa |
| 19 | Create a project template that adds a quota to every new project | New project has quota |
oc create quota finance-q --hard=pods=4,requests.cpu=2 -n finance
oc set resources deploy/web --requests=cpu=100m,memory=128Mi --limits=cpu=500m,memory=256Mi
oc scale deploy/web --replicas=3
oc autoscale deploy/web --min=2 --max=5 --cpu-percent=70
oc adm create-bootstrap-project-template -o yaml > template.yaml
Security Contexts and Network Policies
| # | Task | Check |
| 20 | Run an image that needs a specific UID using a service account and SCC | Pod Running |
| 21 | Allow traffic to web only from the router and the same project | Test from another project fails |
| 22 | Deny all ingress in project db except from finance | curl from both projects |
oc create sa legacy-sa
oc adm policy add-scc-to-user anyuid -z legacy-sa
oc set serviceaccount deploy/legacy legacy-sa
cat <<'EOF' | oc apply -n db -f -
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-finance
spec:
podSelector: {}
ingress:
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: finance
EOF
Troubleshooting Tasks
| # | Broken state to create and fix | Where to look |
| 23 | Image name typo: ImagePullBackOff | oc describe pod, events |
| 24 | Wrong service selector: route returns 503 | oc get endpoints |
| 25 | Pod pending on a quota | oc get events --sort-by=.lastTimestamp |
oc get events -n finance --sort-by=.lastTimestamp | tail
oc logs deploy/web --previous
oc debug deploy/web
oc adm must-gather # cluster-wide diagnostics
A Four-Week Practice Plan
- Week 1: tasks 1 to 10 daily until each takes under five minutes.
- Week 2: tasks 11 to 19, rebuilding from an empty project each time.
- Week 3: tasks 20 to 25 and mixed sets of ten under a timer.
- Week 4: full mock runs, then re-check every result from a fresh login.
Our DO280 and EX280 practice guide and OpenShift architect path continue from here, or talk to a WebAsha training advisor about DO280 batches.
References