cka-sim/weak-spots-cka.md
vumast3r 58a357d7d2 feat: add kube-apiserver failure and node-join-verification tasks
Close two of the four CKA-relevant gaps identified against Killercoda's
scenario catalog:

- Q123 (TSHOOT, hard): kube-apiserver itself crash-loops on a static-pod
  manifest typo, same pattern as the existing scheduler/controller-manager
  failures (Q20/Q118) but with the added twist that kubectl is completely
  unusable until it's fixed, forcing node-level diagnosis (crictl,
  journalctl).
- Q124 (ARCH, hard): produce a real node-join handoff file by
  independently computing the CA discovery hash kubeadm join verifies
  against, and finding the API server's actual in-cluster address rather
  than the local kubeconfig's port-forwarded one.

Cluster-upgrade and operator-authoring remain unimplemented and are
documented as genuine infrastructure gaps in CKA_SOLUTIONS_EXPLAINED.md
(kind's node images have no apt-installable multi-version kubelet/kubeadm,
and operator authoring needs a real built/pushed image) rather than faked.

Also updates the Killercoda cross-reference table with the gaps closed,
and logs an ended drill session to history-cka.jsonl/weak-spots-cka.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-10 21:25:18 -06:00

256 lines
13 KiB
Markdown

# CKA weak spots
_Generated by exam from 3 attempt(s); regenerated on every `end`._
## Domain scores (latest full exam, 2026-09-08T19:59, 14.3%)
- **ARCH** 12/221 — Cluster Architecture, Installation & Configuration (25%)
- **WORK** 1/151 — Workloads & Scheduling (15%)
- **NET** 0/142 — Services & Networking (20%)
- **STOR** 0/66 — Storage (10%)
- **TSHOOT** 2/128 — Troubleshooting (30%)
## Drill next (`./exam drill weak`)
### Q01 · ARCH · RBAC for a deployment bot (1/1 failed, last 2/6 pts, 2026-09-06T22:07)
- ✗ ServiceAccount rbac-app/deploy-bot exists
- ✗ Role deploy-manager and RoleBinding deploy-bot-binding exist
- ✗ deploy-bot can get/list/watch/create/update/patch/delete deployments
### Q03 · ARCH · Kustomize overlay (1/1 failed, last 0/5 pts, 2026-09-08T19:59)
- ✗ overlay kustomization.yaml exists
- ✗ resources deployed into namespace store-prod
- ✗ store-api has 3 replicas
- ✗ Deployment and Service carry label env=prod
### Q05 · ARCH · Static pod (1/1 failed, last 0/5 pts, 2026-09-06T22:07)
- ✗ manifest containing static-web is in /etc/kubernetes/manifests on the node
- ✗ mirror pod static-web-<node> is Running
- ✗ image is nginx:1.27
### Q06 · ARCH · Certificates: expiry check and user CSR (1/1 failed, last 0/6 pts, 2026-09-06T22:07)
- ✗ apiserver-expiry.txt records the real expiry month and year
- ✗ CSR jane exists with signer kubernetes.io/kube-apiserver-client
- ✗ CSR jane approved and certificate issued
- ✗ jane can list pods in default (view) but not delete them
### Q08 · WORK · Multi-container pod with shared volume (1/1 failed, last 0/4 pts, 2026-09-08T19:59)
- ✗ pod log-shipper Running with containers app and shipper
- ✗ volume logs is an emptyDir mounted at /var/log in both containers
- ✗ shipper's logs show lines written by app
### Q12 · NET · NodePort Service (1/1 failed, last 0/4 pts, 2026-09-08T19:59)
- ✗ Service shop-svc is NodePort, port 80 -> targetPort 80
- ✗ nodePort is 30080
- ✗ Service has endpoints
### Q13 · NET · Ingress routing (1/1 failed, last 0/5 pts, 2026-09-08T19:59)
- ✗ ingressClassName nginx and host shop.example.com
- ✗ /api (Prefix) -> api:8080
- ✗ / (Prefix) -> web:80
### Q15 · STOR · PersistentVolume, claim and pod (1/1 failed, last 0/6 pts, 2026-09-08T19:59)
- ✗ PV pv-data: 1Gi hostPath /mnt/data, RWO, Retain, class manual
- ✗ PVC pvc-data Bound to pv-data
- ✗ data-pod Running with claim mounted at /usr/share/data
### Q16 · STOR · Default StorageClass and dynamic provisioning (1/1 failed, last 0/5 pts, 2026-09-08T19:59)
- ✗ StorageClass fast-local: local-path, WaitForFirstConsumer, Delete
- ✗ fast-local is default and standard is not
- ✗ fast-claim picked up fast-local and is Bound
- ✗ fast-pod Running with claim at /data
### Q17 · TSHOOT · Node NotReady (1/1 failed, last 0/8 pts, 2026-09-08T19:59)
- ✗ node is Ready
- ✗ kubelet is active
- ✗ kubelet is enabled (survives reboot)
### Q18 · TSHOOT · Broken deployment and service (1/1 failed, last 0/7 pts, 2026-09-08T19:59)
- ✗ all payments replicas available
- ✗ Service payments has endpoints (selector fixed)
- ✗ Service targetPort matches container port 80
### Q19 · TSHOOT · CrashLoopBackOff diagnosis (1/1 failed, last 1/6 pts, 2026-09-08T19:59)
- ✗ crasher.log captured and contains the DB_HOST failure
- ✗ pod crasher Running with DB_HOST set
### Q20 · TSHOOT · Control plane component failure (1/1 failed, last 0/8 pts, 2026-09-08T19:59)
- ✗ kube-scheduler static pod manifest repaired
- ✗ new pods get scheduled
### Q25 · WORK · Taints and tolerations (1/1 failed, last 0/4 pts, 2026-09-08T19:59)
- ✗ cka-sim-worker carries workload=batch:NoSchedule
- ✗ deployment tolerates the taint
- ✗ both pods Running on cka-sim-worker
### Q28 · WORK · Init container prepares content (1/1 failed, last 0/4 pts, 2026-09-08T19:59)
- ✗ pod Running, init container named setup completed
- ✗ emptyDir 'content' shared by both containers
- ✗ nginx serves the init-written content
### Q29 · WORK · Immutable ConfigMap rotation (1/1 failed, last 1/4 pts, 2026-09-08T19:59)
- ✗ deployment now references a different ConfigMap
- ✗ all pods available and see mode=new
### Q30 · NET · Named ports (1/1 failed, last 0/4 pts, 2026-09-08T19:59)
- ✗ container port 80 named app-port
- ✗ Service port 8080 -> targetPort app-port (by name)
- ✗ readiness probe uses the named port; endpoints ready
### Q33 · ARCH · Aggregated ClusterRole (1/1 failed, last 1/5 pts, 2026-09-08T19:59)
- ✗ ops-44 has an aggregationRule with the right label
- ✗ aggregation populated rules from the two labelled roles
- ✗ lee can list pods and services cluster-wide
### Q34 · ARCH · Discover a CRD field with kubectl explain (1/1 failed, last 0/4 pts, 2026-09-06T22:07)
- ✗ path.txt has the correct field path
- ✗ Gadget/sample created with the field = 4
### Q37 · TSHOOT · Cluster DNS is broken (1/1 failed, last 1/6 pts, 2026-09-08T19:59)
- ✗ CoreDNS Corefile forwards to the node resolver again
- ✗ in-cluster and external names resolve from a pod
### Q40 · ARCH · kubeadm join token (1/1 failed, last 0/5 pts, 2026-09-08T19:59)
- ✗ join.sh contains a kubeadm join with token and CA hash
- ✗ the token in the file exists in the cluster with TTL ~2h
### Q41 · ARCH · Component versions (1/1 failed, last 0/4 pts, 2026-09-06T22:07)
- ✗ apiserver and kubelet versions correct
- ✗ etcd and runtime versions correct
### Q42 · NET · Egress-only NetworkPolicy (1/1 failed, last 0/4 pts, 2026-09-08T19:59)
- ✗ applies to app=client-47, Egress only
- ✗ DNS rule: kube-system namespace + k8s-app=kube-dns, ports 53 UDP and TCP
- ✗ TCP 443 to 192.168.100.0/24 only
### Q106 · ARCH · CRD with validation and defaults (1/1 failed, last 0/7 pts, 2026-09-10T21:07)
- ✗ CRD exists, Namespaced, replicas has min/max and is required
- ✗ good created with environment prod
- ✗ replicas 0 is rejected and the message was saved
- ✗ defaulting works: defaulted.spec.environment == dev
### Q112 · NET · TLS Ingress with a generated certificate (1/1 failed, last 0/7 pts, 2026-09-10T21:07)
- ✗ Secret portal.lab.local-tls is kubernetes.io/tls with CN portal.lab.local
- ✗ Ingress web: class nginx, host, TLS secret, ssl-redirect annotation
- ✗ fp.txt matches the secret's certificate fingerprint
### Q115 · STOR · Bind the right local volume (1/1 failed, last 1/6 pts, 2026-09-10T21:07)
- ✗ PVC uses a selector and is Bound to lv-nvme
- ✗ consumer Running on the nvme node with /data mounted
### Q120 · TSHOOT · Cluster facts, exactly (1/1 failed, last 0/5 pts, 2026-09-10T21:07)
- ✗ pod-cidr and service-cidr
- ✗ dns-ip and proxy-mode
- ✗ cka-sim-worker3 pod CIDR
### Q121 · WORK · The context's namespace (1/1 failed, last 1/6 pts, 2026-09-10T21:07)
- ✗ Deployment ledger-14 in ac-omega (the context's namespace), 2 available, owner=ac
- ✗ Service ledger-14 port 9000 in the same namespace
- ✗ ns.txt has the namespace
## Attempt matrix
| Q | Domain | Title | D1 | E2 | D3 |
|---|---|---|---|---|---|
| 1 | ARCH | RBAC for a deployment bot | 2/6 | · | · |
| 2 | ARCH | etcd snapshot | · | ✓ | · |
| 3 | ARCH | Kustomize overlay | · | 0/5 | · |
| 4 | ARCH | CustomResourceDefinition | · | ✓ | · |
| 5 | ARCH | Static pod | 0/5 | · | · |
| 6 | ARCH | Certificates: expiry check and user CSR | 0/6 | · | · |
| 7 | WORK | Rolling update & scaling | · | · | · |
| 8 | WORK | Multi-container pod with shared volume | · | 0/4 | · |
| 9 | WORK | Scheduling with node affinity and resources | · | · | · |
| 10 | WORK | ConfigMap and Secret consumption | · | · | · |
| 11 | NET | NetworkPolicy | · | · | · |
| 12 | NET | NodePort Service | · | 0/4 | · |
| 13 | NET | Ingress routing | · | 0/5 | · |
| 14 | NET | Cluster DNS | · | · | · |
| 15 | STOR | PersistentVolume, claim and pod | · | 0/6 | · |
| 16 | STOR | Default StorageClass and dynamic provisioning | · | 0/5 | · |
| 17 | TSHOOT | Node NotReady | · | 0/8 | · |
| 18 | TSHOOT | Broken deployment and service | · | 0/7 | · |
| 19 | TSHOOT | CrashLoopBackOff diagnosis | · | 1/6 | · |
| 20 | TSHOOT | Control plane component failure | · | 0/8 | · |
| 21 | ARCH | Helm release install and upgrade | · | · | · |
| 22 | NET | Gateway API HTTPRoute | · | · | · |
| 23 | WORK | metrics-server repair and HPA | · | · | · |
| 24 | WORK | PriorityClass | · | · | · |
| 25 | WORK | Taints and tolerations | · | 0/4 | · |
| 26 | WORK | DaemonSet on every node | · | · | · |
| 27 | WORK | CronJob with a manual run | · | · | · |
| 28 | WORK | Init container prepares content | · | 0/4 | · |
| 29 | WORK | Immutable ConfigMap rotation | · | 1/4 | · |
| 30 | NET | Named ports | · | 0/4 | · |
| 31 | WORK | Parallel Job | · | · | · |
| 32 | WORK | ResourceQuota and LimitRange | · | · | · |
| 33 | ARCH | Aggregated ClusterRole | · | 1/5 | · |
| 34 | ARCH | Discover a CRD field with kubectl explain | 0/4 | · | · |
| 35 | STOR | Re-bind a Released PersistentVolume | · | · | · |
| 36 | STOR | Data survives the pod | · | · | · |
| 37 | TSHOOT | Cluster DNS is broken | · | 1/6 | · |
| 38 | TSHOOT | Deployments never create pods | · | · | · |
| 39 | TSHOOT | kubelet misconfiguration | · | · | · |
| 40 | ARCH | kubeadm join token | · | 0/5 | · |
| 41 | ARCH | Component versions | 0/4 | · | · |
| 42 | NET | Egress-only NetworkPolicy | · | 0/4 | · |
| 43 | NET | Headless and ExternalName services | · | · | · |
| 101 | ARCH | Exact RBAC with an existing over-grant | · | · | · |
| 102 | ARCH | etcd restore | · | · | · |
| 103 | ARCH | Static pod on a relocated manifest path | · | · | · |
| 104 | ARCH | User onboarding to a working kubeconfig | · | · | · |
| 105 | ARCH | Kustomize with generators and patches | · | · | · |
| 106 | ARCH | CRD with validation and defaults | · | · | 0/7 |
| 107 | WORK | Spread, tolerate, prioritise — under a quota | · | · | · |
| 108 | WORK | Rollback to a specific revision, then pause | · | · | · |
| 109 | WORK | Native sidecar with probes and an exact report | · | · | · |
| 110 | WORK | Cluster audit to exact files | · | · | · |
| 111 | NET | Zero-trust namespace | · | · | · |
| 112 | NET | TLS Ingress with a generated certificate | · | · | 0/7 |
| 113 | NET | Gateway API canary with header match | · | · | · |
| 114 | NET | DNS down: three faults | · | · | · |
| 115 | STOR | Bind the right local volume | · | · | 1/6 |
| 116 | STOR | Migrate data between claims | · | · | · |
| 117 | TSHOOT | Worker node: three things wrong | · | · | · |
| 118 | TSHOOT | Two control-plane components down | · | · | · |
| 119 | TSHOOT | Application down for four reasons | · | · | · |
| 120 | TSHOOT | Cluster facts, exactly | · | · | 0/5 |
| 121 | WORK | The context's namespace | · | · | 1/6 |
| 122 | ARCH | Renew control-plane certificates | · | · | · |
| 201 | ARCH | kubeconfig forensics | · | · | · |
| 202 | ARCH | Helm chart with CRDs, then a custom resource | · | · | · |
| 203 | WORK | Find the controller, then scale it | · | · | · |
| 204 | WORK | Which Pods get evicted first | · | · | · |
| 205 | ARCH | Kustomize: drop a ConfigMap, add an HPA, override in prod | · | · | · |
| 206 | STOR | PV, PVC and a Deployment that mounts it | · | · | · |
| 207 | TSHOOT | Resource usage scripts | · | · | · |
| 208 | ARCH | Drain a node for maintenance | · | · | · |
| 209 | ARCH | Query the API from inside a Pod | · | · | · |
| 210 | ARCH | ServiceAccount limited to two resources | · | · | · |
| 211 | WORK | DaemonSet on every node | · | · | · |
| 212 | WORK | One Pod per node, on purpose | · | · | · |
| 213 | NET | Convert an Ingress to Gateway API, then split on a header | · | · | · |
| 214 | ARCH | Certificate expiry, two ways | · | · | · |
| 215 | NET | Egress policy with paired destinations | · | · | · |
| 216 | NET | CoreDNS: back up, extend, verify | · | · | · |
| 217 | TSHOOT | Inspect a container with crictl | · | · | · |
| 301 | ARCH | etcd configuration facts | · | · | · |
| 302 | NET | Service rules on the node | · | · | · |
| 303 | NET | A second Service CIDR | · | · | · |
| 304 | ARCH | Bound tokens versus legacy tokens | · | · | · |
| 305 | WORK | Schedule without the scheduler | · | · | · |
| 306 | STOR | Grow a volume in place | · | · | · |
| 307 | TSHOOT | Node accepts nothing new | · | · | · |
| 308 | ARCH | API resource reference card | · | · | · |
| 309 | WORK | A PodDisruptionBudget that blocks maintenance | · | · | · |
| 310 | NET | Route to something outside the cluster | · | · | · |
| 311 | ARCH | Image inventory across the cluster | · | · | · |
| 312 | WORK | A Job that fails, then one that doesn't | · | · | · |
| 313 | NET | Two hosts, TLS, and a default backend | · | · | · |
| 314 | TSHOOT | A static pod that never starts | · | · | · |
| 315 | STOR | Keep the data when the claim goes | · | · | · |
| 316 | ARCH | Plan a control-plane upgrade | · | · | · |
| 317 | TSHOOT | Certificates stop being issued | · | · | · |
_E = full exam, D = drill, · = not in that session, n/m = partial credit._