This page is an operational reference for the CKA. It holds the essential commands organized by exam domain, with the usage context and the pitfalls to avoid.
For detailed explanations, see the dedicated guides (kubeadm, etcd, RBAC, etc.). Here, the goal is to memorize the commands and the reflexes.
What you will learn
This reference gathers the commands the CKA expects you to type without hesitation. By going through it, you will be able to:
- find the cluster administration commands, sorted by exam domain;
- run an upgrade with
kubeadmand a backup or a restore withetcdctlandetcdutl; - apply a troubleshooting method, from the node to the control plane component;
- tell what you learn by heart from what you look up in the documentation on exam day.
Initial setup
In the exam, each task is carried out on a designated host, and kubectl, the k alias and completion are already ready there (official CKA and CKAD tips, retrieved on November 13, 2026): do not waste minutes setting them up. The block below is for your practice cluster. It adds two personal shortcuts, kn and do, to type again on the task host if you want them.
# Core aliasesalias k=kubectlalias kn='kubectl config set-context --current --namespace'export do="--dry-run=client -o yaml"
# Autocompletionsource <(kubectl completion bash)complete -F __start_kubectl k
# Editorexport KUBE_EDITOR=vimThe first reflex for each question is to read the task box: it gives the ssh command of the host where the task is carried out. You connect to it, you work, then you go back to the base host with exit, with no nested ssh (official CKA and CKAD tips, retrieved on November 13, 2026).
# The exact command is in the task boxssh <task-host>
# ... work on the host, kubectl is already installed there ...
# Back to the base hostexitThe kubectl config commands are used to read a kubeconfig on your practice cluster. They are not part of the exam routine.
Reflexes by situation
This table is your quick diagnostic tool. Faced with a symptom, apply the first reflex.
| Situation | First reflex | Command |
|---|---|---|
| Pod in error | Describe + previous logs | kubectl describe pod X then kubectl logs X --previous |
| Node NotReady | Describe + kubelet logs | kubectl describe node X then journalctl -u kubelet |
| Service does not answer | Check the EndpointSlices | kubectl get endpointslice -l kubernetes.io/service-name=X |
| PVC Pending | Check PV and SC | kubectl get pv,pvc,sc then kubectl describe pvc X |
| Scheduling fails | Pod events | kubectl describe pod X → Events section |
| Broken cluster | Global state | kubectl get nodes + kubectl get pods -n kube-system |
| API server down | Static pods | crictl ps or check /etc/kubernetes/manifests/ |
| etcd broken | etcd logs | kubectl logs -n kube-system etcd-master |
| DNS does not resolve | CoreDNS up? | kubectl get pods -n kube-system -l k8s-app=kube-dns |
| Permissions denied | RBAC test | kubectl auth can-i <verb> <resource> --as=<user> |
What to know by heart
These items come up constantly. Do not look them up during the exam.
Critical paths
These locations are those of a cluster installed by kubeadm. The first one matters most when troubleshooting: moving a file out of /etc/kubernetes/manifests/ is enough to stop the matching component. The kubelet re-reads this directory every 20 seconds by default (fileCheckFrequency) and therefore notices the removal within that delay at the latest. The stop was measured at 1 to 31 seconds depending on the component.
# Static pods (control plane)/etc/kubernetes/manifests/
# PKI certificates/etc/kubernetes/pki/
# etcd certificates/etc/kubernetes/pki/etcd/
# kubelet configuration/var/lib/kubelet/config.yaml/etc/kubernetes/kubelet.conf
# Admin kubeconfig/etc/kubernetes/admin.conf~/.kube/configCluster upgrade order
The order is not negotiable: the API server must never be older than the kubelets that connect to it. Workers go one at a time, each one framed by a drain and an uncordon, so that applications stay available during the operation.
- kubeadm on the control plane
- kube-apiserver, scheduler, controller-manager (automatic through kubeadm)
- kubelet and kubectl on the control plane
- Drain the first worker
- kubeadm, kubelet and kubectl on that worker
- Uncordon that worker
- Repeat for each worker
Differences between cordon / drain / uncordon
The confusion is about cordon, which forbids the arrival of new pods but leaves the ones already there running. Only drain really evacuates the node, and it stops until DaemonSet pods or emptyDir volumes have been explicitly accepted with an option.
| Action | Scheduling | Existing pods |
|---|---|---|
cordon | Blocked | Stay |
drain | Blocked | Evacuated |
uncordon | Allowed | not applicable |
Differences between Role / ClusterRole
The third row is the one that traps people: a ClusterRole tied to a RoleBinding only grants rights in the namespace of the binding. This setup is used to reuse a definition of permissions without copying it namespace by namespace.
| Type | Scope | Resources |
|---|---|---|
| Role + RoleBinding | 1 namespace | Pods, Deployments, Secrets... |
| ClusterRole + ClusterRoleBinding | Whole cluster | Nodes, PVs, Namespaces + everything |
| ClusterRole + RoleBinding | 1 namespace | Reuse of a ClusterRole, limited |
PSA labels (Pod Security Admission)
Pod Security Admission is enabled by a simple namespace label, with nothing to install. The enforce, audit and warn modes are independent: only enforce really rejects a non-compliant pod.
# Apply the Restricted policykubectl label ns production pod-security.kubernetes.io/enforce=restrictedWhat to look up in the docs
These items are more complex. Copy them from kubernetes.io on exam day.
- Complete syntax of an Ingress with TLS
- Advanced fields of a NetworkPolicy (namespaceSelector, ipBlock)
- Advanced kubeadm init options (HA, --upload-certs)
- EncryptionConfiguration for etcd secrets
- PodDisruptionBudget syntax
Recommended bookmarks:
kubernetes.io/docs/reference/kubectl/quick-reference/kubernetes.io/docs/concepts/security/kubernetes.io/docs/tasks/administer-cluster/
Commands by domain
The tabs follow the split of the exam domains. Each one groups the commands actually used in the test, followed by the pitfalls flagged under the blocks: they are what costs points, rarely the basic syntax.
The kubeadm, apt-get, systemctl and etcd commands run as root on the node concerned: open a root shell with sudo -i, or prefix them with sudo, as the restore blocks do.
kubeadm, initialization and upgrade
kubeadm init installs the control plane but leaves the cluster without a network: nodes stay NotReady until a CNI is deployed. The value of --pod-network-cidr must match the one that CNI expects.
# Initialize the control planekubeadm init --pod-network-cidr=10.244.0.0/16
# Configure kubectl after initmkdir -p $HOME/.kubecp -i /etc/kubernetes/admin.conf $HOME/.kube/config
# Generate the join commandkubeadm token create --print-join-command
# Check the upgrade plankubeadm upgrade plan
# Apply the upgrade (adapt the version)kubeadm upgrade apply v1.X.0
# Upgrade a workerkubeadm upgrade nodeThe classic pitfall is forgetting systemctl daemon-reload && systemctl restart kubelet after upgrading the kubelet.
Complete upgrade of a worker
The sequence alternates between two machines: drain and uncordon run from the control plane, the package installation on the worker. kubeadm upgrade node updates the local configuration but does not replace the kubelet package, hence the apt-get line that follows. Packages installed following the official procedure are frozen by apt-mark hold: without apt-mark unhold first, apt-get install -y refuses to change them, and you freeze them again afterwards.
# On the control planekubectl drain worker1 --ignore-daemonsets --delete-emptydir-data
# On the workerapt-mark unhold kubeadm kubelet kubectlapt-get install -y kubeadm=1.X.0-1.1kubeadm upgrade nodeapt-get install -y kubelet=1.X.0-1.1 kubectl=1.X.0-1.1apt-mark hold kubeadm kubelet kubectlsystemctl daemon-reloadsystemctl restart kubelet
# On the control planekubectl uncordon worker1For the complete procedure, see the detailed kubeadm guide, which covers installation and administration.
etcd backup
The three certificate options are mandatory: etcd only accepts mutual TLS and refuses the connection without them. Target a single endpoint; thanks to Raft, the snapshot contains the whole database. These commands run on the node, with etcdctl and etcdutl installed: on your practice cluster, take them from the official etcd archive, digest verified, as shown in the backup and restore lesson.
etcdctl snapshot save /backup/etcd-snapshot.db \ --endpoints=https://127.0.0.1:2379 \ --cacert=/etc/kubernetes/pki/etcd/ca.crt \ --cert=/etc/kubernetes/pki/etcd/server.crt \ --key=/etc/kubernetes/pki/etcd/server.keyTo find the certificate paths, read the manifest /etc/kubernetes/manifests/etcd.yaml.
Check the backup
snapshot status reads the file offline, without touching the cluster, and prints the hash, the revision and the number of keys. A key total of zero betrays a backup taken on an empty endpoint.
etcdutl snapshot status /backup/etcd-snapshot.db --write-out=tableThree commands, two binaries. snapshot save talks to the
live etcd server, that is etcdctl. snapshot status and snapshot restore work on
an offline file, that is etcdutl. Calling etcdctl snapshot status
shows no error: the command exits 0 without checking anything, which
makes a backup script look green while it controls nothing.
# ❌ prints the help and returns 0, without checking anythingetcdctl snapshot status /backup/etcd-snapshot.dbRestore etcd
This cheat sheet follows the procedure of the lesson
Back up and restore Kubernetes,
which details each step and its outputs. It applies to a single control plane,
and you take a backup of the current state first. The restore creates a new
data tree: it is then the hostPath of the etcd.yaml manifest that you must
point at it. The four control plane manifests leave the directory watched by the
kubelet before the restore, and only come back afterwards, once the kubelet has
seen them leave: the Kubernetes documentation says to not restore etcd while an
API server is running.
# 1. Move the four manifests out of the watched directorysudo mkdir -p /root/manifestes-arretes && sudo sh -c 'mv /etc/kubernetes/manifests/*.yaml /root/manifestes-arretes/'
# 2. Wait until the containers are gone (empty list)sudo crictl ps --name etcdsudo crictl ps --name kube-apiserver
# 3. Restore into a NEW directory, with etcdutlsudo etcdutl snapshot restore /backup/etcd-snapshot.db \ --name <member-name> \ --initial-cluster <member-name>=https://<ip>:2380 \ --initial-advertise-peer-urls https://<ip>:2380 \ --data-dir /var/lib/etcd-restaure
# 4. In /root/manifestes-arretes/etcd.yaml: hostPath.path: /var/lib/etcd-restaure
# 5. Put the manifests back, restart the kubeletsudo sh -c 'mv /root/manifestes-arretes/*.yaml /etc/kubernetes/manifests/'sudo systemctl restart kubelet
# 6. Checkkubectl get nodes
# 7. Restore validated: update etcd.local.dataDir in the kubeadm-config ConfigMapkubectl -n kube-system edit configmap kubeadm-configkubectl -n kube-system get configmap kubeadm-config -o yaml | grep dataDirThe three values --name, --initial-cluster and --initial-advertise-peer-urls
are read from /etc/kubernetes/manifests/etcd.yaml. A pitfall to know:
etcdctl snapshot restore no longer exists in 3.7 and answers
Error: unknown flag: --data-dir with exit code 1 (recorded on etcd 3.7.0), the restore
belongs to etcdutl. With no option at all, the same command prints the help and exits
with code 0 without restoring anything: never trust the return code alone.
Health check
The expected output is one line per endpoint, with the mention is healthy and the response time. The same certificates as for the backup are still required.
etcdctl endpoint health \ --endpoints=https://127.0.0.1:2379 \ --cacert=/etc/kubernetes/pki/etcd/ca.crt \ --cert=/etc/kubernetes/pki/etcd/server.crt \ --key=/etc/kubernetes/pki/etcd/server.keyNode management
The - suffix is the detail to memorize: disktype- removes the label, and the same notation removes a taint. On drain, the --ignore-daemonsets option is almost always required, since any real cluster hosts DaemonSet pods.
# List with detailskubectl get nodes -o wide
# Diagnosiskubectl describe node worker1
# Labelskubectl label node worker1 disktype=ssdkubectl label node worker1 disktype- # Remove
# Taintskubectl taint node worker1 dedicated=database:NoSchedulekubectl taint node worker1 dedicated=database:NoSchedule- # Remove
# Maintenancekubectl cordon worker1kubectl drain worker1 --ignore-daemonsets --delete-emptydir-datakubectl uncordon worker1
# Metrics (Metrics Server required)kubectl top nodeskubectl top pods --sort-by=memoryTaint effects
NoExecute is the only retroactive effect: it evicts the pods already in place, where NoSchedule only blocks the following ones. This distinction determines the immediate impact of a taint set on a node in production.
| Effect | Behavior |
|---|---|
NoSchedule | New Pods blocked, existing ones stay |
PreferNoSchedule | Avoids if possible (soft) |
NoExecute | Evicts existing ones + blocks new ones |
Create Roles
The imperative form avoids writing the YAML by hand, which matters against the clock. Verbs are listed separated by commas with no space, and without -n, the Role lands in the current namespace.
# Role in a namespacekubectl create role pod-reader \ --verb=get,list,watch \ --resource=pods \ -n development
# ClusterRolekubectl create clusterrole node-reader \ --verb=get,list,watch \ --resource=nodesCreate Bindings
The binding ties a Role to a subject, designated by --user, --group or --serviceaccount. For a ServiceAccount, the expected syntax is namespace:name, not to be confused with the full format used by auth can-i.
# RoleBinding → userkubectl create rolebinding reader-binding \ --role=pod-reader \ --user=jane \ -n development
# RoleBinding → ServiceAccountkubectl create rolebinding sa-binding \ --role=pod-reader \ --serviceaccount=development:myapp \ -n development
# ClusterRoleBindingkubectl create clusterrolebinding admin-binding \ --clusterrole=cluster-admin \ --user=adminTest permissions
auth can-i queries the authorization module and answers yes or no without changing anything. The --list option gives the whole extent of a subject's rights, much faster than rebuilding its RoleBindings one by one.
# My permissionskubectl auth can-i create pods
# Permissions of a userkubectl auth can-i delete pods --as=jane -n development
# Permissions of a ServiceAccountkubectl auth can-i list secrets \ --as=system:serviceaccount:development:myapp \ -n development
# List all permissionskubectl auth can-i --list --as=jane -n developmentFor a ServiceAccount, --as expects the full format system:serviceaccount:NAMESPACE:NAME.
List existing RBAC
Roles are namespaced, hence the -A to see them all; ClusterRoles are not. A freshly installed cluster already has several dozen, created by the system itself.
kubectl get roles,rolebindings -Akubectl get clusterroles,clusterrolebindingskubectl describe role pod-reader -n developmentCreate Services
kubectl expose automatically picks up the selector of the Deployment, which removes the main source of error of a hand-written Service. --target-port designates the container port, --port the Service port.
# ClusterIP (default)kubectl expose deploy webapp --port=80 --target-port=8080
# NodePortkubectl expose deploy webapp --port=80 --type=NodePort
# With a custom namekubectl expose deploy webapp --port=80 --name=webapp-svc
# Generate YAMLkubectl expose deploy webapp --port=80 $do > svc.yamlCheck and debug
The decisive command is get endpointslice: it tells you whether the Service found pods behind its selector. The old get endpoints still works but prints a deprecation warning since 1.33, which wastes time on exam day. The two kubectl run --rm -it commands create a throwaway pod, the only observation point from which internal DNS resolution works.
# Listkubectl get svc -o wide
# EndpointSlices (IPs of the Pods behind the Service)kubectl get endpointslice -l kubernetes.io/service-name=webapp-svc
# Test from a Podkubectl run test --image=busybox:1.37@sha256:bdf57e528e45e4433820e045b29b4597825a1c9e38353532d90a01445013f82e --rm -it -- wget -qO- webapp-svc
# DNS testkubectl run test --image=busybox:1.37@sha256:bdf57e528e45e4433820e045b29b4597825a1c9e38353532d90a01445013f82e --rm -it -- nslookup webapp-svc.default.svc.cluster.localIf the list of EndpointSlices stays empty, the Service's selector matches no Pod.
Internal DNS
The short name is enough inside the same namespace; elsewhere, you must at least append the namespace. The full suffix is never mandatory from a pod, since the resolver's search list completes it automatically (busybox's nslookup is the exception, hence the full name in the test above).
<service>.<namespace>.svc.cluster.local- Same namespace:
webapp-svc - Cross-namespace:
webapp-svc.production
PersistentVolume (admin)
The PV is created by the administrator and belongs to no namespace. The Retain policy keeps the data after the PVC is deleted, at the price of a volume that stays Released and that no new claim can take without manual intervention.
apiVersion: v1kind: PersistentVolumemetadata: name: pv-dataspec: capacity: storage: 10Gi accessModes: [ReadWriteOnce] persistentVolumeReclaimPolicy: Retain storageClassName: manual hostPath: path: /data/pvPersistentVolumeClaim (dev)
The PVC expresses a request, size and access mode, which Kubernetes matches against the available PVs. The storageClassName must match exactly the one of the targeted volume, since an empty string and a missing field do not mean the same thing.
apiVersion: v1kind: PersistentVolumeClaimmetadata: name: pvc-dataspec: accessModes: [ReadWriteOnce] resources: requests: storage: 5Gi storageClassName: manualUseful commands
get pv,pvc shows at a glance whether the binding happened, both objects moving to Bound. The last command extracts the StorageClass marked as default, the one any PVC without a storageClassName will use.
# List and check bindingkubectl get pv,pvc
# Detailskubectl describe pvc pvc-data
# StorageClasseskubectl get sc
# Default SCkubectl get sc -o jsonpath='{.items[?(@.metadata.annotations.storageclass\.kubernetes\.io/is-default-class=="true")].metadata.name}'Access Modes
The requested mode must be supported by both the PV and the underlying storage. RWX requires a shared file system, NFS or CephFS for example: a block disk will never provide it, whatever the PV declares.
| Mode | Description |
|---|---|
| RWO | Read/Write by 1 node |
| ROX | Read-only by several nodes |
| RWX | Read/Write by several nodes |
A PVC left in Pending signals a size, an accessModes or a storageClassName that does not fit any available PV.
Default deny all
An empty podSelector: {} selects all the pods of the namespace, and declaring both policyTypes with no rule cuts traffic in both directions. It is the base on which the allow rules are then added.
apiVersion: networking.k8s.io/v1kind: NetworkPolicymetadata: name: deny-all namespace: productionspec: podSelector: {} policyTypes: [Ingress, Egress]Allow specific traffic
NetworkPolicies add up: this one opens a path through the previous deny-all without cancelling it. The top-level podSelector designates the protected pods, the one in the from block designates the pods allowed to reach them.
apiVersion: networking.k8s.io/v1kind: NetworkPolicymetadata: name: allow-frontend namespace: productionspec: podSelector: matchLabels: app: backend policyTypes: [Ingress] ingress: - from: - podSelector: matchLabels: app: frontend ports: - port: 8080Verify
describe shows the rules with their resolved selectors, as the CNI must apply them. A policy present in this list is not necessarily active: the network plugin must also support it.
kubectl get netpol -Akubectl describe netpol allow-frontend -n productionA NetworkPolicy only takes effect with a compatible CNI (Calico, Cilium): Flannel alone does not enforce them.
Troubleshooting (30% of the exam)
Questions in this domain rarely hinge on an isolated command: you must locate the failure before fixing it. The approach goes down from the cluster to the node and then to the pod, each level having its own tools, kubectl on one side, journalctl and crictl on the other when the API no longer answers.
Methodology
These five steps rule out a costly mistake in the test: fixing at random without having read the events. The level identified at the second step drives the tools: a kubelet fault leaves no trace in kubectl logs.
- Identify the symptom: what exactly is happening?
- Locate the level: Pod, Node or Cluster?
- Collect information with
describe,logsandevents. - Form a hypothesis: what could the cause be?
- Fix, then verify.
Cluster state
cluster-info confirms that the API server answers, get nodes that the kubelets register with it. The --raw='/readyz?verbose' call details each internal check of the server and points to the failing subsystem.
# Overviewkubectl cluster-infokubectl get nodeskubectl get pods -n kube-system
# Health checkkubectl get --raw='/readyz?verbose'Pod diagnosis
describe comes before logs: the Events section explains failures that happened before the container even started, image not found or volume not mounted, cases where no log exists. The --previous option is the only way to read the output of a container that has already restarted.
# Statekubectl get pod mypod -o wide
# Details (ESSENTIAL)kubectl describe pod mypod
# Logskubectl logs mypodkubectl logs mypod --previous # After a crashkubectl logs mypod -c container # Multi-container
# Shellkubectl exec -it mypod -- /bin/shNode diagnosis
A NotReady node is diagnosed from the machine itself: describe node lists the reported conditions, but the cause is in the kubelet journal. Filtering by time window avoids digging up errors unrelated to the current incident.
# From the control planekubectl describe node worker1
# On the problem nodesystemctl status kubeletjournalctl -u kubelet | tail -50journalctl -u kubelet --since "10 minutes ago" | grep -i errorControl plane component diagnosis
These components run as static pods, driven by the kubelet and not by the API. When kubectl no longer answers, crictl ps and the files in /var/log/pods/ become the only sources of information available on the node.
# Static pod logskubectl logs -n kube-system kube-apiserver-masterkubectl logs -n kube-system etcd-masterkubectl logs -n kube-system kube-scheduler-masterkubectl logs -n kube-system kube-controller-manager-master
# Or directly on the nodecrictl pscat /var/log/pods/kube-system_kube-apiserver-*/kube-apiserver/*.logCommon problems and solutions
This table reads from the symptom to the cause: the state shown by kubectl get pods already narrows the hypotheses a lot. CreateContainerConfigError and ImagePullBackOff are told apart right away: the first comes from a missing ConfigMap or Secret, the second from the registry.
| Symptom | Probable cause | Solution |
|---|---|---|
Pod Pending | No eligible node | Check taints, resources, nodeSelector |
Pod ImagePullBackOff | Image does not exist or credentials | Check image name, registry secret |
Pod CrashLoopBackOff | App crash | kubectl logs --previous |
Pod CreateContainerConfigError | Missing ConfigMap/Secret | kubectl describe pod → Events |
Node NotReady | kubelet down | systemctl restart kubelet |
Node MemoryPressure | RAM saturated | Evict Pods |
| Service not reachable | Empty EndpointSlice | Check selector vs Pod labels |
| DNS timeout | CoreDNS down | Check kube-dns Pods |
kubectl timeout | API server down | Check /etc/kubernetes/manifests/ |
Quick YAML generation
The $do variable defined at the start of the page adds --dry-run=client -o yaml: the resource is not created, its manifest goes to standard output. It is a very profitable technique in the test: producing a valid skeleton and then editing it costs far less time than writing the YAML from memory.
# Podkubectl run nginx --image=nginx:1.30@sha256:9bf97bd7714f5e24c1ccd545ecb9eb5435cb6d109c97cebb15e7e455e0239edb $do > pod.yaml
# Deploymentkubectl create deploy webapp --image=nginx:1.30@sha256:9bf97bd7714f5e24c1ccd545ecb9eb5435cb6d109c97cebb15e7e455e0239edb --replicas=3 $do > deploy.yaml
# Servicekubectl expose deploy webapp --port=80 $do > svc.yaml
# Jobkubectl create job myjob --image=busybox:1.37@sha256:bdf57e528e45e4433820e045b29b4597825a1c9e38353532d90a01445013f82e -- /bin/sh -c "echo hello" $do
# CronJobkubectl create cronjob mycron --image=busybox:1.37@sha256:bdf57e528e45e4433820e045b29b4597825a1c9e38353532d90a01445013f82e --schedule="*/5 * * * *" -- date $do
# ConfigMapkubectl create cm myconfig --from-literal=key=value $do
# Secretkubectl create secret generic mysecret --from-literal=password=secret $do
# Rolekubectl create role myrole --verb=get,list --resource=pods $do
# RoleBindingkubectl create rolebinding mybinding --role=myrole --user=jane $do
# ServiceAccountkubectl create sa mysa $doCondensed cheat sheet
This block gathers the commands of the previous sections for a quick review before the test. The values between angle brackets are to be replaced, and the ellipses of etcdctl hide the certificate options which, for their part, cannot be omitted.
# === HOST AND NAMESPACE ===ssh <task-host> # command given by the task boxkubectl config set-context --current --namespace=<ns>exit # back to the base host
# === CLUSTER ===kubeadm init --pod-network-cidr=10.244.0.0/16kubeadm token create --print-join-commandkubeadm upgrade plan && kubeadm upgrade apply v1.X.0
# === ETCD === save with etcdctl, status and restore with etcdutl# restore: manifests moved out first, etcd.yaml hostPath repointed, manifests put back afteretcdctl snapshot save /backup/snap.db --endpoints=... --cacert=... --cert=... --key=...etcdutl snapshot status /backup/snap.db --write-out=tableetcdutl snapshot restore /backup/snap.db --name=... --initial-cluster=... --initial-advertise-peer-urls=... --data-dir=/var/lib/etcd-restaure
# === NODES ===kubectl cordon/drain/uncordon <node>kubectl taint node <node> key=value:NoSchedulekubectl label node <node> disktype=ssd
# === RBAC ===kubectl create role <name> --verb=get,list --resource=podskubectl create rolebinding <name> --role=<role> --user=<user>kubectl auth can-i create pods --as=jane
# === TROUBLESHOOT ===kubectl describe pod/node/svc <name>kubectl logs <pod> --previousjournalctl -u kubelet | grep errorsystemctl restart kubeletKey takeaways
The first two points hold before you even read the question: do not waste time setting up k and completion, and handle each task on the designated host. The rest is retained through practice, not through rereading.
- On the exam task hosts, the
kalias and completion are already ready. - Read the box of each task: it gives the ssh command to the task host, where you work before coming back with
exit. - Memorize the etcd certificate path,
/etc/kubernetes/pki/etcd/:etcdctlbacks up,etcdutlverifies and restores. - For an upgrade, the control plane goes first, then each worker, with
drainanduncordon. - A Role applies to a namespace, a ClusterRole to the cluster.
- Troubleshooting weighs 30% of the exam: master
describe,logs, events andjournalctl. - The static Pod manifests are in
/etc/kubernetes/manifests/. - To produce a manifest, use
$dosystematically.
Test your knowledge
Seven questions on what this page asks you to know by heart: the order of operations, the paths you do not look up on exam day, and the distinctions that cost points.
Knowledge check
Check what you have learned with this interactive quiz
How it works
- The timer starts when you click Start
- Multiple choice, true/false and short answer questions
- You can move between questions
- Detailed results are shown at the end
Starts the quiz and the timer
Review
(0/0)Score by domain
A domain groups several guides and gets several questions, so its score is more reliable than a per-topic score, which often rests on a single question.
Summary
Strengths
No topic passed at 80% on at least two questions yet.
Weak areas
No topic below the pass mark.
Recommended next
Hints before you try again?
Continue the course: CKA exercises: timed practice for the exam
A new full quiz with random questions
Work again only on the questions you missed