KCNA: Cloud Native Application Delivery
16% of the KCNA exam, 2 competencies. Back to the KCNA overview.
Each competency lists what to know and the official documentation to read, then a demo you can run. Demos run on the demo lab, a throwaway kind cluster on your own machine; set it up once before you start.
Application Delivery
Section titled “Application Delivery”Know
- CI builds and tests images; CD deploys them. GitOps keeps the desired state in Git and lets a controller (Argo CD, Flux) apply it.
- Deployments roll out new versions gradually and can roll back. Helm packages applications; Kustomize patches YAML without templates.
Read
Demo: Declarative delivery from a directory
-
Create a namespace for this demo and make it the default for your context.
Terminal window kubectl create namespace kcna-deliverykubectl config set-context --current --namespace=kcna-delivery -
Keep the app as files, the way a GitOps tool would read them from Git.
Terminal window mkdir -p app && cat > app/deploy.yaml <<'EOF'apiVersion: apps/v1kind: Deploymentmetadata:name: webspec:replicas: 2selector:matchLabels:app: webtemplate:metadata:labels:app: webspec:containers:- name: appimage: registry.k8s.io/e2e-test-images/agnhost:2.66.1args: ["netexec", "--http-port=8080"]EOFkubectl apply -f app/ -
Change the file, preview the change, then apply it.
Terminal window sed -i 's/replicas: 2/replicas: 3/' app/deploy.yamlkubectl diff -f app/kubectl apply -f app/kubectl get deployment web
What you should see: kubectl diff shows only the replicas line changing before anything happens. Argo CD and Flux automate exactly this loop: read files from Git, diff, apply.
Clean up:
rm -rf appkubectl config set-context --current --namespace=defaultkubectl delete namespace kcna-deliveryPractise
- Roll a Deployment to a new image, then roll it back with
kubectl rollout undo.
On this site
Debugging
Section titled “Debugging”Know
- Debugging an application on Kubernetes means separating “the app is broken” from “the platform is broken”: check the pod, then the Service, then the network path.
kubectl debugattaches an ephemeral container to a running pod, useful when the image has no shell.
Read
Demo: Get inside a pod that has no shell
-
Create a namespace for this demo and make it the default for your context.
Terminal window kubectl create namespace kcna-debugkubectl config set-context --current --namespace=kcna-debug -
Run a distroless-style container: the pause image has no shell at all.
Terminal window kubectl run quiet --image=registry.k8s.io/pause:3.10.2kubectl wait --for=condition=Ready pod/quiet --timeout=120skubectl exec quiet -- sh || true -
Attach an ephemeral debug container that shares its process namespace.
Terminal window kubectl debug -it quiet --image=registry.k8s.io/e2e-test-images/busybox:1.37.0-2 --target=quiet -- sh -c 'ps; ls /proc/1/root/' -
Or copy the pod and change its command, leaving the original alone.
Terminal window kubectl debug quiet --copy-to=quiet-copy --image=registry.k8s.io/e2e-test-images/busybox:1.37.0-2 --share-processes -- sleep 3600kubectl get pods
What you should see: exec fails with executable file not found. The ephemeral container sees the /pause process as PID 1 and can browse its filesystem. The copy is a separate pod you can break freely.
Clean up:
kubectl config set-context --current --namespace=defaultkubectl delete namespace kcna-debugOn this site
Domain and competency names are from the CNCF KCNA curriculum (current curriculum (unversioned)), cncf/curriculum, licensed CC BY 4.0. Summaries, demos, and exercises are original to this site.