Dit deel is nog niet vertaald. Je ziet de Engelse tekst.
$ als gewone gebruiker# als root (of met sudo)
Set up the terminal once
A few aliases and variables at the start pay back in every task.
Use imperative commands
Most objects can be created in one line, or generated as YAML to edit.
| Object | Command |
|---|---|
| Pod | k run web --image=nginx --port=80 --labels=app=web |
| Deployment | k create deploy web --image=nginx --replicas=3 |
| Service | k expose deploy web --port=80 --target-port=8080 |
| ConfigMap | k create cm cfg --from-literal=k=v --from-file=f.conf |
| Secret | k create secret generic s --from-literal=pw=x |
| Role / binding | k create role r --verb=get,list --resource=pods; k create rolebinding … |
| Job / CronJob | k create job j --image=busybox -- echo hi; k create cronjob … |
| Ingress | k create ingress i --rule="host/path=svc:port" |
| HPA | k autoscale deploy web --min=2 --max=5 --cpu-percent=70 |
Find things in the docs fast
kubectl explain is faster than the docs for field names; the docs search is best for full YAML examples.
k explain pod.spec.containers.securityContext
k explain networkpolicy.spec.ingress --recursive | head -30
k api-resources --namespaced=true | grep -i quotaOp het werk
Bookmark nothing (not allowed), but know the doc page titles: "Network Policies", "Configure a Security Context", "Operating etcd clusters", "Upgrading kubeadm clusters", "Persistent Volumes", "Ingress".
Work through the tasks
Points per task are shown. Do quick tasks first, flag long ones, come back later.
- Read the task fully; run the context command it gives.
- Note the namespace — most wrong answers are in the wrong namespace.
- Make it, then verify (
get,describe,auth can-i,curlfrom a pod). - Move on after 7 – 8 minutes; come back at the end.
Practise the classic tasks
These appear in some form in almost every exam — do each one many times.
| Task | Lesson |
|---|---|
| etcd backup and restore | Back up etcd |
| Upgrade control plane and a worker | Upgrade |
| Fix a NotReady node | Debug a node |
| RBAC for a user or service account | RBAC |
| NetworkPolicy between namespaces | NetworkPolicies |
| PVC + pod with a mount | Storage |
| Rollout and rollback | Workloads |
| Ingress or Gateway routes | Ingress |
| Taints, tolerations, node affinity | Scheduling |
| Install with Helm | Helm |
Onthoud
Use killer.sh (2 sessions come with the exam) in the last two weeks. It is harder than the real exam — 60 – 70 % there is a good sign.