Member-only story
DevOps in K8s — K8s Architecture
In order to have a good understanding of K8s architecture, at first, we need to have a good grasp of the concepts and K8s design principals. Although the system itself is quite complex, it is actually based on a relatively small number of concepts that are repeated throughout. These design principles allow K8s to grow, while still remaining approachable to developers. Let’s explore these core concepts.
Declarative Configuration
This means you can declare a desired state of the object to produce a desired result, it is one of the primary drivers behind the development of K8s. For example:
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
spec:
replicas: 3
...
The above configuration ask K8s to keep 3 replicas of Nginx
server running at all times. Once you provide the above configuration to K8s, it takes that declarative statement and takes responsibility for ensuring that it is true.
Declarative configuration differs from imperative configuration in which users provide a series of direct actions. Imperative actions are often simpler to understand. But the power of the declarative approach is it allows the K8s cluster to take autonomous action, independent of user interactions. This…