A cloud native application is not simply an application deployed in the cloud. It is an application designed to take advantage of distributed environments: it is deployed in containers, communicates through APIs, updates without downtime and repairs itself. This lesson details the principles that set it apart from a traditional application, using the vocabulary of the CNCF (the foundation that hosts Kubernetes) and of the KCNA certification.
The examples mention Kubernetes objects (Pod, Service, ConfigMap, Job). If you have not handled them yet, read them as illustrations: their dedicated lessons teach them one by one, and you do not need to master them to follow this one.
What you will learn
- Name the six main principles of a cloud native architecture
- Compare monolith, modular monolith and microservices, and say when to choose each
- Explain why immutable infrastructure replaces servers instead of modifying them
- Link the 12 factors of an application to Kubernetes practices
- Describe the reconciliation loop that makes Kubernetes a declarative system
- Tell the OCI standard apart from the Kubernetes CRI, CNI and CSI interfaces
The main principles of a cloud native architecture
Six principles come up regularly in cloud native architectures. The table gives the idea of each in one sentence.
| Principle | Key idea |
|---|---|
| Containerization | Package the application with its dependencies into a portable, standard unit |
| Automation | Deploy, update and operate without manual action (CI/CD, GitOps, IaC) |
| Declarative | Describe the desired state rather than the steps to reach it |
| Loose coupling | Let components evolve independently thanks to clear interfaces |
| Immutability | Replace rather than modify in place, so each change produces a new version |
| Observability | Understand the system in real time through logs, metrics and distributed traces |
The goal is a system with the following properties, close to those retained by the CNCF v1.1 definition (loosely coupled, secure, resilient, manageable, sustainable and observable):
- Resilient: failures are expected and repaired automatically (this is self-healing)
- Scalable: each component can be adjusted independently according to load
- Manageable: operations are automated and reproducible
- Observable: metrics, logs and traces make it possible to diagnose problems quickly
- Secure: communications are encrypted, identities are verified, policies are enforced
Beyond the principles: patterns and advanced capabilities
These basic principles translate into architectural patterns and more specific capabilities. The table places them, with the moment when each becomes useful.
| Pattern / Capability | Role | When to consider it |
|---|---|---|
| Microservices | Architecture style that splits the application into independent services | When several teams work on distinct business domains |
| Service mesh | Dedicated network layer that handles communication between services, their security (mTLS: each side proves its identity with a certificate) and their observability | When the number of services and the network complexity justify it |
| Serverless | Execution model where code runs on demand, without managing the infrastructure | For event-driven processing and one-off functions |
These patterns are not prerequisites for doing cloud native. They are options to adopt when the context justifies it.
From monolith to microservices
An application can be split in three ways: a single block, a single block organized into modules, or several independent services. All three work, and none is the right answer everywhere. This section presents each architecture with its strengths, gives a table to choose, then compares the two ways services talk to each other.
The monolithic architecture
A monolith is an application whose whole code lives in a single deployable block. All functions share the same process, the same deployment cycle and the same failure: a memory error in the billing module also takes down the catalog and authentication.
It still has real strengths, especially at the start:
- it is simple to develop and deploy;
- it adds no network latency between components;
- transactions are easier, since there is only one database;
- it requires less operations work.
The modular monolith: the realistic compromise
Between the classic monolith and microservices, there is an intermediate step: the modular monolith. The application remains a single deployable, but the code is organized into well-separated modules, with clear boundaries between business domains.
It is a reasonable starting point for a new project or a small team: you keep the operational simplicity of the monolith (one deployment, one database, no network between services) and you prepare the extraction of services if the need is confirmed. Martin Fowler advocates starting with a monolith whose design stays modular, in his article MonolithFirst. He starts from the observation that even experienced architects place the boundaries of a system badly before having built it.
The microservices architecture
Microservices split the application into independent services. Each service tends to own its data and to limit direct schema sharing with the others. It is not always "one database per service" in the strict sense: what matters most is data autonomy and clear responsibility boundaries.
The main benefit is failure isolation. If the payment service goes down, the catalog remains browsable and navigation continues. A monolith does not offer this partial degradation, since the same process carries all the functions.
Microservices bring four benefits:
- Independent scalability: you add capacity only to the service that needs it.
- Independent deployment: an update of the payment service does not affect the catalog.
- Autonomous teams: each team manages its service end to end.
- Technology freedom: the recommendation service can be in Python, the order service in Go.
When to choose what?
The table gives indicative landmarks drawn from practice, with no numeric thresholds: the complexity of the domain and the maturity of the team weigh more than the number of developers.
| Criterion | Monolith | Modular monolith | Microservices |
|---|---|---|---|
| Team | a small team | one or a few teams that coordinate | several autonomous teams |
| Domain complexity | a single simple domain | several identified domains | mature domains, clear boundaries |
| Deployment | everything together, rarely | everything together, regularly | service by service, at its own pace |
| Capacity need | the same for the whole application | mostly the same | different for each service |
| Operating cost | low | low | requires a platform team |
| Typical case | prototype, MVP | new project whose domains are taking shape | mature organization, proven need |
Communication between services: synchronous vs asynchronous
In a microservices architecture, services communicate in two ways:
- Synchronous (REST, gRPC): service A calls B and waits for the response. It is simple, but one slow service can block the whole chain (the cascade effect).
- Asynchronous (message queues, event streaming): service A publishes a message and carries on without waiting. Services are decoupled in time: if B goes down, messages pile up and are processed when it comes back.
The choice depends on the acceptable level of coupling and the required response time. You use synchronous when the user is waiting for the answer (displaying a page), and asynchronous for background processing (sending an email, generating a report).
Immutable infrastructure
Immutable infrastructure is never modified after its deployment: when something must change, you build a new version and replace the old one. This section starts from the problem this choice solves, the drift of servers modified by hand, then describes the four steps of an update and what it changes day to day.
The problem of mutability
Traditionally, servers are managed as pets: you give them a name, you update them by hand, you repair them when they fall ill. After months of patches, each server is unique and nobody knows how to reproduce exactly the same environment.
This is configuration drift: the actual state of the server diverges from what is documented. One day, a server that seemed identical to the others behaves differently in production. The page Baselines and configuration drift (in French) shows how to detect it on a Linux fleet.
The immutable approach
In immutable infrastructure, servers are cattle: anonymous, interchangeable, replaceable. Instead of modifying an existing server, you proceed in four steps.
-
Build a new image with the desired changes (container image, virtual machine image).
-
Deploy the new version next to the old one.
-
Switch the traffic to the new version.
-
Destroy the old one once the switch is validated.
Concrete benefits
The table compares, on five points, managing a server modified in place with managing a replaced image.
| Aspect | Mutable (traditional) | Immutable (cloud native) |
|---|---|---|
| Update | SSH, apt upgrade, then hope | New image, deployment, rollback on error |
| Reproducibility | "It worked before Tuesday's patch" | Image v2.3.1 is identical everywhere |
| Rollback | Complex, sometimes impossible | Redeploy the previous image |
| Audit | Who changed what, when? | Each version is tracked in Git |
| Scaling | Clone a server by hand | Launch N instances of the same image |
Infrastructure as Code (IaC)
Immutable infrastructure goes hand in hand with Infrastructure as Code: your infrastructure is defined in versioned files, with tools such as Terraform, Pulumi or Crossplane. Each change goes through Git, then through a code review and the continuous integration and delivery pipeline (CI/CD) before deployment. There is no SSH connection and no manual modification.
The 12-Factor Apps
The 12-Factor Apps are twelve rules formulated by Heroku in 2011 and open-sourced in 2024. They describe how to build applications that are portable, scalable and operable as a service. They still serve as a common basis for designing a cloud-ready application.
The 12 factors explained
Each row of the table gives the rule and an example of what it becomes on Kubernetes.
| # | Factor | Rule | Concrete example |
|---|---|---|---|
| 1 | Codebase | One Git repository = one application | No repository mixing three different applications |
| 2 | Dependencies | Declare dependencies explicitly | requirements.txt, package.json, go.mod |
| 3 | Config | Configuration in the environment | Environment variables, Kubernetes ConfigMaps |
| 4 | Backing services | Treat third-party services as attachable resources | The database is a URL, changeable without touching the code |
| 5 | Build, release, run | Separate build, release and run | CI builds the image, then Kubernetes deploys it |
| 6 | Processes | The application runs as stateless processes | No data kept in memory from one request to the next |
| 7 | Port binding | The application exposes its services through a port | The container listens on a port, the Kubernetes Service routes traffic to it |
| 8 | Concurrency | Scale out by multiplying processes | The Horizontal Pod Autoscaler (HPA) increases the number of Pods |
| 9 | Disposability | Fast startup, graceful shutdown | The container starts in seconds and handles the SIGTERM stop signal |
| 10 | Dev/prod parity | Identical environments | The same image in development, staging and production |
| 11 | Logs | Treat logs as event streams | Write to standard output, collect with Fluentd |
| 12 | Admin processes | Run administration tasks as one-off processes | A database migration launched by a Kubernetes Job, not by SSH |
Four factors have a direct and visible effect on Kubernetes: 3 (Config), 6 (Processes, stateless), 9 (Disposability) and 11 (Logs). They decide whether the application moves painlessly from one cluster to another.
Limits of the 12 factors
The 12 factors remain a useful basis for thinking about portability, configuration and operations. But they do not cover the whole of modern cloud native architecture:
- Orchestration: the management of the container lifecycle (placement, scaling, self-healing) is not addressed.
- Security: access policies, encryption of communications and secrets management go beyond factor 3.
- Stateful workloads: databases, distributed file systems and caches have constraints that factor 6 (stateless) does not solve on its own.
- Observability: metrics, distributed traces and alerts are not covered by factor 11 (logs).
These complements are found in the cloud native ecosystem (Kubernetes, Prometheus, OPA, service mesh): they are not gaps in the 12 factors, which do not claim to cover everything.
Going from these principles to a tooled audit requires translating each factor into a Kubernetes object and an observable check. This is the purpose of the lesson Make an application 12-factor compliant on Kubernetes, which audits a real application on a kind cluster.
Declarative APIs
With a declarative API, you do not tell Kubernetes what to do: you tell it what you want to obtain, and it takes care of getting there and staying there. This section contrasts the two ways of giving an order, shows a YAML manifest, then explains the loop that repairs the cluster by itself.
Imperative vs declarative
This distinction is at the heart of Kubernetes. There are two ways to ask for the same thing:
- Imperative: you give the steps to reach the result. "Create an nginx container, expose port 80, start 3 replicas."
- Declarative: you describe the desired state and the system takes care of it. "I want 3 replicas of nginx on port 80."
Kubernetes works declaratively. You write a YAML manifest that describes the desired state, and the Kubernetes controllers (programs that watch the cluster) constantly make sure the actual state matches it. In the example below, replicas sets the number of copies wanted, and image the version to run. The rest of the file links the Deployment to its Pods, and the lesson dedicated to it details this.
# Declarative example: I declare what I wantapiVersion: apps/v1kind: Deploymentmetadata: name: mon-appspec: replicas: 3 # I want 3 replicas selector: matchLabels: app: mon-app template: metadata: labels: app: mon-app spec: containers: - name: app image: mon-app:v2.1 # I want this version ports: - containerPort: 8080The reconciliation loop
Kubernetes controllers apply a permanent reconciliation loop. They observe the current state of the cluster (how many Pods are running?), compare it with the desired state (the manifest says 3 replicas), then act to close the gap. They start again as soon as a change occurs: they react to Kubernetes API events, with a periodic resynchronization as a safety net.
The diagram shows the three steps of the loop, then a worked example. Look at the gap between three desired replicas and two in place: it is what triggers the action.
Two distinct mechanisms repair a failure, without human intervention. If a container crashes, it is the kubelet (the Kubernetes agent on each node) that restarts it in the same Pod: the RESTARTS counter of kubectl get pods goes up, then the Pod goes into CrashLoopBackOff if the crashes repeat. If the Pod disappears, because it was deleted, evicted or its node was lost (in that case, the Pod is evicted about five minutes, that is 300 seconds by default, after the node is declared unreachable), the Deployment controller notices: it sees fewer Pods than requested replicas and creates a new one. These two mechanisms form self-healing.
Observability: understanding your system in real time
Observability is the ability to understand the internal state of a system by examining its outputs. In a distributed environment with dozens of services, looking at the logs of a single server is no longer enough.
The three pillars of observability
The table associates each type of signal with a reference CNCF project. The "Graduated" level is the highest maturity level of the CNCF; the lesson on the CNCF ecosystem explains it.
| Pillar | What it is | Reference CNCF tool |
|---|---|---|
| Metrics | Numeric values measured over time (CPU, latency, error rate) | Prometheus (Graduated) |
| Logs | Timestamped text events emitted by applications | Fluentd / Fluent Bit (Graduated) |
| Distributed traces | Tracking a request across several services | OpenTelemetry (Graduated), Jaeger (Graduated) |
OpenTelemetry (OTel) is the CNCF project that unifies the collection of these three signals in a single framework. It was born from the merger of the former OpenTracing and OpenCensus projects, which it replaces.
Why it is a principle, not a tool
Observability is not "installing Prometheus". It is a property of the system, built from the design stage:
- applications write their logs to standard output (factor 11);
- services expose their metrics on a dedicated endpoint (
/metrics); - requests are instrumented with traces, thanks to headers that link the calls of a single request across services.
Without observability, diagnosing a failure in a distributed system becomes very difficult.
Open standards and interoperability
Cloud native is also an open ecosystem, carried by foundations and open source projects. This section shows through which interfaces Kubernetes plugs into it and why these standards avoid depending on a single provider.
The standardized Kubernetes interfaces
Kubernetes does not itself launch containers, does not itself configure the network of Pods and does not itself provide persistent storage. It entrusts each of these tasks to a replaceable component, through a standardized interface. There are three.
| Interface | Role | Example implementations |
|---|---|---|
| CRI (Container Runtime Interface) | Communication between the kubelet (the agent present on each node) and the runtime, the program that launches containers | containerd, CRI-O |
| CNI (Container Network Interface) | Pod networking (communication, network policies) | Flannel, Calico, Cilium |
| CSI (Container Storage Interface) | Persistent storage for Pods | Longhorn, Ceph, AWS EBS |
OCI (Open Container Initiative) is of a different nature: it is not a Kubernetes interface, but an industry standard that defines the format of container images, how to run them and how to distribute them. Docker, Podman, containerd and CRI-O support its specifications. That is what lets you build an image with one tool and run it with another, on a Kubernetes cluster as elsewhere.
Why it matters
These interfaces and this standard give three guarantees:
- You are not locked in (vendor lock-in) with a single provider.
- You can replace containerd with CRI-O, or Flannel with Cilium, without changing the rest of the stack. On an existing cluster, changing the CNI or the runtime still requires a planned migration.
- Innovation progresses in parallel on each layer without breaking everything.
These interfaces describe contracts and not products: knowing them remains useful whatever tool you choose next. It is loose coupling applied to the infrastructure itself.
The KCNA certification assesses your understanding of the wider cloud native ecosystem (CNCF projects, open standards, governance), not only Kubernetes. The guide CNCF ecosystem covers these aspects in detail.
Loose coupling: the common thread
Loose coupling is the cross-cutting principle that links all the others. In a loosely coupled system, each component:
- exposes a clear interface (REST API, gRPC, events) without revealing its internal details;
- can be replaced by a compatible alternative (changing the database, the runtime);
- evolves at its own pace: you deploy service A without touching service B;
- fails in isolation: an error in the storage service does not affect the payment service.
This principle shows up at three levels:
- the code: loosely coupled services communicate through APIs;
- the infrastructure: CRI, CNI and CSI make it possible to replace the runtime, the network or the storage, and OCI guarantees that images move from one tool to another;
- the organization: autonomous teams work independently thanks to clear interface contracts.
The guide Loose coupling and stateless design (in French) goes deeper into this principle and its counterpart, stateless design. Kubernetes is the orchestrator that puts these principles into practice, and the Docker concepts recall what containers and images are, the basic building block of cloud native. If you are aiming for the certification, the KCNA preparation guide turns these notions into a revision plan.
Key points
- Cloud native rests on principles (containerization, automation, declarative, loose coupling, immutability, observability), not on a fixed list of technologies.
- Microservices, service mesh and serverless are patterns to adopt when the context justifies them, not prerequisites.
- The modular monolith is a reasonable starting point for a new project, as long as the business boundaries remain to be discovered.
- Immutable infrastructure eliminates configuration drift: you replace instead of modifying.
- 12-factor apps are a useful basis for portability, but do not on their own cover orchestration, security or observability.
- Declarative APIs and the reconciliation loop let Kubernetes repair itself and automate deployments.
- OCI standardizes images and their execution; CRI, CNI and CSI are the three interfaces through which Kubernetes entrusts containers, network and storage to replaceable components.
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)Result saved on this device. It will be sent to your account at the next sync. Sync now
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: CNCF ecosystem: understand the foundation and evaluate a project
A new full quiz with random questions
Work again only on the questions you missed