KCNA · Question #190
Which style of operations are preferred for K8S and cloud native applications?
The correct answer is B. Declarative. Kubernetes and cloud-native applications strongly favor a declarative style of operations, where users define the desired state of their system, and the system works to achieve and maintain that state. This contrasts with imperative operations, which focus on explicitly issuing…
Question
Which style of operations are preferred for K8S and cloud native applications?
Options
- AJSON
- BDeclarative
- CImperative
How the community answered
(33 responses)- A6% (2)
- B88% (29)
- C6% (2)
Why each option
Kubernetes and cloud-native applications strongly favor a declarative style of operations, where users define the desired state of their system, and the system works to achieve and maintain that state. This contrasts with imperative operations, which focus on explicitly issuing commands to change state.
JSON is a data serialization format used to represent Kubernetes objects, but it's not a style of operations itself; both declarative and imperative commands can use JSON.
Kubernetes operates on a declarative model, meaning users define the desired state of their applications and infrastructure using configuration files (like YAML). The Kubernetes control plane then continuously observes the actual state of the cluster and works to reconcile it with the desired state, automatically managing resources to maintain stability and recover from failures.
Imperative operations involve directly issuing commands to execute actions, specifying *how* to achieve a state. While Kubernetes supports some imperative commands (e.g., `kubectl run`), the preferred and more robust operational style for managing complex, long-lived cloud-native applications is declarative.
Concept tested: Kubernetes declarative operations
Source: https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/#declarative-vs-imperative-management
Topics
Community Discussion
No community discussion yet for this question.