Cloud Certifications: AWS, Azure and Kubernetes · Course book
Chapter 4: Kubernetes and the Cloud Native Ecosystem
The Kubernetes and Cloud Native Associate certification, KCNA, comes from the Cloud Native Computing Foundation, CNCF, the organisation that looks after Kubernetes and many related open-source projects. Unlike the hands-on Kubernetes administrator and developer exams, KCNA is multiple choice and tests breadth: how Kubernetes is built, how containers are orchestrated, what "cloud native" means as an approach, and how the many tools of the ecosystem fit together. This chapter covers those areas in the proportions the exam uses, building on the Kubernetes basics in the containers course.
The exam and its domains
At the time the course was published, the exam had 60 questions to answer in 90 minutes, with a passing score of 75 percent. Its content is divided into five domains with fixed weights, which tell you where to spend study time.
On a 60-question paper, 46 percent is about 28 questions on Kubernetes fundamentals, 22 percent about 13 on orchestration, 16 percent about 10 on architecture, and about 5 each on observability and delivery. Passing requires 45 correct answers, so you can afford to miss 15. The course also recommends existing familiarity with cloud concepts, networking and Linux before starting, and, because the exam tests knowledge of kubectl, practising in a real cluster.
Kubernetes architecture
A cluster consists of a control plane and worker nodes. The control plane is made of several components, each with one job, and questions often ask which component does what.
| Component | Where it runs | Job |
|---|---|---|
| kube-apiserver | Control plane | The front door: every request, from kubectl or from other components, goes through its API |
| etcd | Control plane | A consistent key-value store holding the entire state of the cluster |
| kube-scheduler | Control plane | Chooses a node for each new pod, based on resources and constraints |
| kube-controller-manager | Control plane | Runs control loops that keep actual state matching desired state |
| cloud-controller-manager | Control plane | Connects the cluster to a cloud provider, for load balancers and disks |
| kubelet | Every node | Starts and watches the pods assigned to its node |
| kube-proxy | Every node | Maintains network rules so that services reach the right pods |
| Container runtime | Every node | Actually runs containers, for example containerd or CRI-O |
Kubernetes talks to runtimes through a standard interface, the Container Runtime Interface, so different runtimes can be swapped in. Similar standard interfaces exist for networking, the CNI, and for storage, the CSI, which is why so many vendors can plug their products into Kubernetes.
Objects and orchestration
Beyond pods, deployments and services, the exam expects familiarity with the other common objects. A ReplicaSet keeps a set number of identical pods running and is managed by a deployment. A StatefulSet runs pods that need stable names and their own storage, such as database replicas. A DaemonSet runs one pod on every node, for agents such as log collectors. Jobs and CronJobs run tasks to completion, once or on a schedule. ConfigMaps and Secrets supply settings and sensitive values to pods. Namespaces divide one cluster into separate areas for teams or environments, and labels and selectors tie objects together, as when a service selects the pods it routes to.
Storage is handled through PersistentVolumes, pieces of storage in the cluster, and PersistentVolumeClaims, requests for storage made by pods; a StorageClass lets claims create volumes automatically. Traffic from outside reaches services through an Ingress, which routes requests by host name and path, with the newer Gateway API offering a more flexible alternative. Scaling can be automatic: the Horizontal Pod Autoscaler adds pods when, for example, average processor use passes a target.
Pods also have a lifecycle worth knowing. A new pod is Pending until it is scheduled and its images are pulled, Running once at least one container has started, and finally Succeeded or Failed when its containers finish. A container that keeps crashing shows the status CrashLoopBackOff, meaning Kubernetes is restarting it with growing delays between attempts. Readiness probes decide whether a pod receives traffic, liveness probes decide whether it should be restarted, and resource requests and limits tell the scheduler how much processor and memory each container needs and may use.
Security in Kubernetes rests on role-based access control, RBAC: Roles grant permissions within a namespace and ClusterRoles across the cluster, attached to users or to service accounts used by pods. Network policies restrict which pods may talk to which, and security contexts stop containers running as root.
Cloud native architecture, observability and delivery
Cloud native describes building systems to take full advantage of the cloud: applications split into microservices that can be deployed and scaled independently, packaged in containers, managed declaratively, and designed to tolerate failure. Related ideas include serverless platforms that run code without managing servers, the autoscaling of both pods and nodes, and a service mesh, such as Istio or Linkerd, which handles secure communication, retries and traffic routing between services through small proxies placed beside each one.
Observability means being able to understand a system from its outputs, and rests on three signals: metrics, logs and traces. Prometheus, a CNCF graduated project, collects metrics by regularly fetching them from applications, and is usually paired with Grafana dashboards. Log collectors such as Fluentd gather logs from every node, and OpenTelemetry provides a standard way to produce traces and metrics. Cost management is part of observability too: knowing which workloads consume which resources.
Cloud native systems are also expected to follow open standards. The Open Container Initiative defines the formats for container images and runtimes, so an image built with one tool runs with another, and Kubernetes itself is governed openly, with releases roughly three times a year.
Application delivery covers how changes reach the cluster. Helm packages Kubernetes applications as charts, templates with configurable values. GitOps keeps the desired state of the cluster in a Git repository and uses a tool such as Argo CD or Flux to apply it automatically, so every change is reviewed and recorded, and the cluster corrects itself if someone changes it by hand.
Preparing for the exam
Because KCNA tests breadth, the best preparation combines reading with doing. Running a small cluster on your own computer, with a tool such as Minikube or kind, and working through everyday tasks with kubectl makes the components and objects concrete: create a deployment, scale it, expose it with a service, break a pod and watch it be replaced, then read the events with kubectl describe. Questions that describe a situation, such as "a pod is stuck in Pending", become much easier when you have seen it happen and know that it usually means the scheduler could not find a node with enough resources.
A few command patterns are worth knowing by heart, because questions often show one and ask what it does: kubectl get to list objects, kubectl describe for details and events, kubectl logs for a container's output, kubectl apply -f to create or update objects from a file, and kubectl exec to run a command inside a container. Knowing that kubectl get pods -n kube-system lists the pods in the system namespace, where many control plane components run, answers several question types at once.
For the ecosystem domains, focus on what each well-known project is for rather than how to configure it. A short list of names and purposes covers most questions: Prometheus for metrics, Fluentd for logs, Jaeger and OpenTelemetry for traces, Helm for packaging, Argo CD and Flux for GitOps, Envoy for proxying, Istio and Linkerd for service meshes, containerd and CRI-O as runtimes, and etcd for cluster state. Pair that list with the CNCF's maturity levels and you can place almost any project the exam mentions.
Finally, treat the weights as a study plan. With almost half the marks on Kubernetes fundamentals and over a fifth on orchestration, those two domains deserve about two thirds of your time. Practice exams, such as the free one supplied with the course, reveal weak areas early, and reviewing every wrong answer, not just counting the score, is where most of the learning happens.
Check your understanding
- On a 60-question exam, about how many questions cover Kubernetes fundamentals? (Answer: 46 percent of 60, about 28.)
- How many correct answers are needed to reach 75 percent of 60? (Answer: 45.)
- Which component stores the cluster's state, and which chooses a node for a new pod?
- What is the difference between a Deployment, a StatefulSet and a DaemonSet?
- What does a PersistentVolumeClaim do?
- Name the three signals of observability and one CNCF tool for metrics.
- What is GitOps, and why does it make changes safer?
- Name the three CNCF project maturity levels.
This course book is available to read online only at tech-academy.chrysolites.org.