- There are actually two ways to create and manage K8s components.
- Imperative and declarative
| Approach | Imperative | Declarative |
|---|---|---|
| Explanation | Telling Kubernetes what to do | Telling Kubernetes what we want |
| Tool | Kubernetes CLI (e.g., kubectl) | Kubernetes configuration files (YAML) |
| Capability | Enables direct interaction with the clusters | Provides an alternative for managing more complex architectures |
| Operations | Operate directly on live objects | Operate on object’s configuration files |
| Limitation | Not suitable for managing complex architectures | YAML configuration files offer a more scalable approach for complex scenarios |
⬅️ Kubernetes Architecture Control Plane and Worker Nodes | Main kubernetes components ➡️