Skip to Content
Asterrr's Handbook
4 · Cloud native architecture

Cloud native principles

What "cloud native" means in the CNCF definition, microservices vs monoliths, immutability and declarative APIs, and serverless with Knative.

Exam tasks: 4.2 (cloud native ecosystem and principles: architecture characteristics, serverless)

The decision: which design property (loose coupling, immutability, declarative state, elastic scaling) does the scenario need, and which Kubernetes mechanism or CNCF project delivers it?

The CNCF definition in one line

The CNCF's official definition says cloud native technology helps you build and run scalable applications in dynamic environments: public, private and hybrid clouds. Its usual building blocks are containers, microservices, service meshes, declarative APIs and immutable infrastructure. The aim is loosely coupled systems you can operate, observe and recover easily, paired with automation so engineers can ship frequent, predictable changes with little toil.

Change often, low riskLoosely coupled servicesAutomation: CI/CD, GitOpsMicroservicesContainersDeclarative APIsImmutable infrastructure
The CNCF definition. Loosely coupled parts plus automation let you change often with low risk.
5
Building blocks in the CNCF definition: containers, service meshes, microservices, immutable infrastructure, declarative APIs.
Immutable
Replace instances with new images instead of patching them.
Loose coupling
Services change independently, which allows frequent low-risk releases.

Exam signal

If an option says cloud native "means running in a public cloud", it's wrong. Cloud native is about how applications are built and operated. It applies equally on premises.

Characteristics worth recognising

PrincipleWhat it means in practiceKubernetes expression
Declarative over imperativeYou state the end result; a controller works out the stepsYAML manifests applied to the API, reconciled by controllers
Immutable infrastructureNever patch a running instance; build a new image and replace itNew image tag, rolling update replaces Pods
Disposable, stateless processesAny instance can die and be replaced without losing dataDeployments with state kept in databases or volumes
Self-healingThe system notices drift and corrects itReplicaSets recreate Pods, probes restart containers
ElasticCapacity follows demand, both waysHPA, VPA, Cluster Autoscaler, KEDA
Resilient by designExpect failure: retries, timeouts, circuit breakers, multiple replicas across zonesTopology spread, PodDisruptionBudgets, service mesh policies
ObservableYou can understand the system from its telemetryPrometheus, OpenTelemetry
  • The phrase cattle, not pets sums up disposability: servers and Pods are numbered and replaceable, not named and nursed back to health.
  • The Twelve-Factor App guidelines predate Kubernetes but map well onto it: config in the environment (ConfigMaps, Secrets), logs as event streams (stdout), stateless processes, and dev/prod parity.

Monoliths and microservices

MonolithMicroservices
Deploy unitOne artifact for the whole appOne per service, released independently
ScalingScale everything togetherScale only the hot service
Failure blast radiusOne bug can take down the whole appContained to a service if designed well
DataOne shared databaseEach service owns its data
Complexity lives inThe codebaseThe network: discovery, latency, partial failure, tracing
  • Microservices trade code complexity for operational complexity. That's why they come with service discovery, service meshes and distributed tracing.
  • A small team with a simple app may be better off with a well-structured monolith. The exam rewards knowing the trade-off, not "microservices always".

Microservices sharing one database

Splitting an app into services that all read and write the same tables keeps the coupling and adds network hops. Loose coupling means each service owns its data and talks to others through APIs or events.

Autoscaling

Autoscaling has its own page: Autoscaling covers HPA, VPA, the Cluster Autoscaler, Karpenter, KEDA and the Cluster Proportional Autoscaler.

Building blocks for microservices

  • Dapr (graduated) is a sidecar runtime that gives microservices common APIs: service invocation, state stores, pub/sub, secrets. The app calls localhost, and Dapr talks to the real backend, so the backend can change without code changes.
  • A service mesh solves the networking side (mTLS, retries, traffic splitting). Dapr solves the application building-block side. They can run together.
  • Helm and ConfigMaps supply packaging and configuration. Both appear in the delivery and core objects pages.

Serverless and Knative

  • Serverless means you supply code or a container and the platform handles servers, scaling (including to zero) and often per-request billing. Functions as a Service (FaaS) is one form.
  • Knative (graduated) brings serverless to Kubernetes. Knative Serving runs request-driven containers with revisions, traffic splitting and scale to zero. Knative Eventing routes events between producers and consumers.
  • CloudEvents (graduated) is the CNCF specification for describing event data in a common way, so events can move between platforms. Knative Eventing uses it.
  • Trade-offs: cold starts after scaling to zero, limits on run time, and less control over the environment.

Scenarios

Scenario
Which statement best reflects the CNCF view of cloud native?
Scenario
A team deploys a fix by SSHing into nodes and editing files inside running containers. Which cloud native principle does this break most directly?

Further reading

On this page