What Cloud Native Is
Cloud native was first proposed in 2013 by Matt Stine of Pivotal. Both PIVOTAL and CNCF have defined cloud native. It centers on the following technical points.
Containerization
Containers provide a portable, reusable way to package and distribute applications.
We can package an application into an image locally, push it to an image registry, and on the server side pull the image directly and create a container. This brings enormous convenience to development, debugging, and deployment, and supports frequent releases.
Beyond that, through namespace-level isolation, containers allow very high deployment density on a single machine while making horizontal scaling easy, absorbing the shocks of peak and off-peak traffic.
Service Mesh
With the rise of microservices, hundreds or thousands of services call one another, and people alone can no longer govern them.
A service mesh can solve a whole series of problems between services: discovery, interconnection, security, protocol conversion, circuit breaking, and authentication. Operations that previously required manual instrumentation and manual maintenance are pushed down into foundational capability.
To the business, a service mesh should be transparent and imperceptible, and yet present everywhere.
DevOps
DevOps actually carries two meanings: a toolchain, and a culture of continuous delivery.
With many applications and many services, the development environment we face is demanding, highly complex, and error-prone. So we need a lot of automated and self-service tooling — continuous integration, continuous deployment, code scanning, security scanning, and so on. These toolchains support our R&D process.
On the other side, DevOps is an attempt to establish a results-oriented development model. Each member is no longer responsible only for a single module, but pays attention across the whole cycle from raising a requirement to delivering it to the user. DevOps emphasizes end-to-end value delivery.
Declarative API
The original count is a=3, and now we need to add 2.
Using a=a+1, a=a+1 is procedural.
Using a=5 is declarative.
What declarative emphasizes is the final state. Intermediate states may be inconsistent or unexpected, but the final state is certain.
Declarative APIs matter greatly in the Kubernetes ecosystem, because in operations scenarios infrastructure is unstable and always going +1, -1 — and there a declarative API is very effective.
Immutable Infrastructure
Under traditional architecture, people must keep every environment consistent. Over time configuration inevitably drifts, which easily leads to incidents.
Immutable infrastructure says that once created, no form of modification is accepted. There is only one way to update: destroy first, then rebuild.
The benefit is a runtime environment that is controllable and manageable.