S
Certified Kubernetes Administrator (CKA) ACTUAL
PERFORMANCE TASK SIMULATION 2026/2027 | Hands-
On kubectl Tasks | No Multiple Choice | Exam Environment
Simulation | Pass Guaranteed - A+ Graded
Cluster Architecture, Installation & Configuration (Tasks 1-4)
Task 1: Create a new ServiceAccount named cka-admin in the kube-system namespace. Bind
this ServiceAccount to the cluster-admin ClusterRole using a ClusterRoleBinding named cka-
admin-binding. Verify the binding exists.
Correct Solution:
Copy
kubectl create serviceaccount cka-admin -n kube-system
kubectl create clusterrolebinding cka-admin-binding --clusterrole=cluster-admin --
serviceaccount=kube-system:cka-admin
kubectl get clusterrolebinding cka-admin-binding
Task 2: You have a kubeadm cluster running Kubernetes v1.28.2. Upgrade the control plane
node to v1.29.0. Ensure the kubelet is also upgraded and restarted. Use the kubeadm upgrade
command sequence.
Correct Solution:
Copy
# On control plane node
kubectl drain control-plane-node --ignore-daemonsets
sudo apt-mark unhold kubeadm && sudo apt-get update && sudo apt-get install -y
kubeadm=1.29.0-00 && sudo apt-mark hold kubeadm
sudo kubeadm upgrade plan
sudo kubeadm upgrade apply v1.29.0
,S
sudo apt-mark unhold kubelet kubectl && sudo apt-get update && sudo apt-get install -y
kubelet=1.29.0-00 kubectl=1.29.0-00 && sudo apt-mark hold kubelet kubectl
sudo systemctl daemon-reload
sudo systemctl restart kubelet
kubectl uncordon control-plane-node
Task 3: Create an etcd backup for the cluster. The etcd endpoint is https://127.0.0.1:2379, the CA
certificate is at /etc/kubernetes/pki/etcd/ca.crt, the client certificate is at
/etc/kubernetes/pki/etcd/server.crt, and the client key is at /etc/kubernetes/pki/etcd/server.key.
Save the snapshot to /var/backups/etcd-snapshot.db.
Correct Solution:
Copy
sudo ETCDCTL_API=3 etcdctl snapshot save /var/backups/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.key
Task 4: Restore the etcd cluster from the snapshot at /var/backups/etcd-snapshot.db. Stop the
kube-apiserver and etcd containers, restore the snapshot, then restart the services. Assume static
pod manifests are at /etc/kubernetes/manifests/.
Correct Solution:
Copy
# Stop kube-apiserver and etcd
sudo mv /etc/kubernetes/manifests/kube-apiserver.yaml /tmp/
sudo mv /etc/kubernetes/manifests/etcd.yaml /tmp/
sudo crictl ps | grep -E 'etcd|kube-apiserver' | awk '{print $1}' | xargs -r sudo crictl stop
# Restore snapshot
, S
sudo ETCDCTL_API=3 etcdctl snapshot restore /var/backups/etcd-snapshot.db \
--data-dir=/var/lib/etcd-restored
# Update etcd data directory in manifest or move restored data
sudo rm -rf /var/lib/etcd
sudo mv /var/lib/etcd-restored /var/lib/etcd
# Restart services
sudo mv /tmp/kube-apiserver.yaml /etc/kubernetes/manifests/
sudo mv /tmp/etcd.yaml /etc/kubernetes/manifests/
Workloads & Scheduling (Tasks 5-9)
Task 5: Create a Deployment named web-app in namespace production using image nginx:1.25
with 3 replicas. Expose the deployment on port 80. Ensure the deployment has a label app=web
and the pods have labels tier=frontend and app=web.
Correct Solution:
Copy
kubectl create deployment web-app --image=nginx:1.25 --replicas=3 --port=80 -n production
kubectl label deployment web-app app=web -n production --overwrite
kubectl patch deployment web-app -n production -p
'{"spec":{"template":{"metadata":{"labels":{"tier":"frontend","app":"web"}}}}}'
Task 6: Create a DaemonSet named node-exporter in namespace monitoring using image
prom/node-exporter:v1.6. Ensure it runs on all nodes including control plane nodes. Mount the
host's /proc and /sys directories to /host/proc and /host/sys in the container.
Correct Solution:
Copy
cat <<EOF | kubectl apply -f -
apiVersion: apps/v1
Certified Kubernetes Administrator (CKA) ACTUAL
PERFORMANCE TASK SIMULATION 2026/2027 | Hands-
On kubectl Tasks | No Multiple Choice | Exam Environment
Simulation | Pass Guaranteed - A+ Graded
Cluster Architecture, Installation & Configuration (Tasks 1-4)
Task 1: Create a new ServiceAccount named cka-admin in the kube-system namespace. Bind
this ServiceAccount to the cluster-admin ClusterRole using a ClusterRoleBinding named cka-
admin-binding. Verify the binding exists.
Correct Solution:
Copy
kubectl create serviceaccount cka-admin -n kube-system
kubectl create clusterrolebinding cka-admin-binding --clusterrole=cluster-admin --
serviceaccount=kube-system:cka-admin
kubectl get clusterrolebinding cka-admin-binding
Task 2: You have a kubeadm cluster running Kubernetes v1.28.2. Upgrade the control plane
node to v1.29.0. Ensure the kubelet is also upgraded and restarted. Use the kubeadm upgrade
command sequence.
Correct Solution:
Copy
# On control plane node
kubectl drain control-plane-node --ignore-daemonsets
sudo apt-mark unhold kubeadm && sudo apt-get update && sudo apt-get install -y
kubeadm=1.29.0-00 && sudo apt-mark hold kubeadm
sudo kubeadm upgrade plan
sudo kubeadm upgrade apply v1.29.0
,S
sudo apt-mark unhold kubelet kubectl && sudo apt-get update && sudo apt-get install -y
kubelet=1.29.0-00 kubectl=1.29.0-00 && sudo apt-mark hold kubelet kubectl
sudo systemctl daemon-reload
sudo systemctl restart kubelet
kubectl uncordon control-plane-node
Task 3: Create an etcd backup for the cluster. The etcd endpoint is https://127.0.0.1:2379, the CA
certificate is at /etc/kubernetes/pki/etcd/ca.crt, the client certificate is at
/etc/kubernetes/pki/etcd/server.crt, and the client key is at /etc/kubernetes/pki/etcd/server.key.
Save the snapshot to /var/backups/etcd-snapshot.db.
Correct Solution:
Copy
sudo ETCDCTL_API=3 etcdctl snapshot save /var/backups/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.key
Task 4: Restore the etcd cluster from the snapshot at /var/backups/etcd-snapshot.db. Stop the
kube-apiserver and etcd containers, restore the snapshot, then restart the services. Assume static
pod manifests are at /etc/kubernetes/manifests/.
Correct Solution:
Copy
# Stop kube-apiserver and etcd
sudo mv /etc/kubernetes/manifests/kube-apiserver.yaml /tmp/
sudo mv /etc/kubernetes/manifests/etcd.yaml /tmp/
sudo crictl ps | grep -E 'etcd|kube-apiserver' | awk '{print $1}' | xargs -r sudo crictl stop
# Restore snapshot
, S
sudo ETCDCTL_API=3 etcdctl snapshot restore /var/backups/etcd-snapshot.db \
--data-dir=/var/lib/etcd-restored
# Update etcd data directory in manifest or move restored data
sudo rm -rf /var/lib/etcd
sudo mv /var/lib/etcd-restored /var/lib/etcd
# Restart services
sudo mv /tmp/kube-apiserver.yaml /etc/kubernetes/manifests/
sudo mv /tmp/etcd.yaml /etc/kubernetes/manifests/
Workloads & Scheduling (Tasks 5-9)
Task 5: Create a Deployment named web-app in namespace production using image nginx:1.25
with 3 replicas. Expose the deployment on port 80. Ensure the deployment has a label app=web
and the pods have labels tier=frontend and app=web.
Correct Solution:
Copy
kubectl create deployment web-app --image=nginx:1.25 --replicas=3 --port=80 -n production
kubectl label deployment web-app app=web -n production --overwrite
kubectl patch deployment web-app -n production -p
'{"spec":{"template":{"metadata":{"labels":{"tier":"frontend","app":"web"}}}}}'
Task 6: Create a DaemonSet named node-exporter in namespace monitoring using image
prom/node-exporter:v1.6. Ensure it runs on all nodes including control plane nodes. Mount the
host's /proc and /sys directories to /host/proc and /host/sys in the container.
Correct Solution:
Copy
cat <<EOF | kubectl apply -f -
apiVersion: apps/v1