Imperative programming prescribes a specific sequence of commands or actions to produce a result. In Kubernetes, this means directing operations step by step rather than describing only the desired end state. section 1.0 section 1.9
An imperative workflow creates practical administration concerns:
- Execution depends on command order, so changing the sequence can affect the result. section 1.9
- Tracking the commands and detecting a failure during sequential execution can be difficult. section 1.9
- Unlike declarative configuration, the approach focuses on the path of commands rather than only the target state. section 1.10 section 1.9
Sequential Kubernetes administration
An administrator using an imperative approach runs a series of commands in a specific sequence to reach a result. This can be contrasted with submitting a YAML manifest that describes the desired Kubernetes state. section 1.9
$ kubectl create -f my-pod-manifest.yaml pod/nginx created
The kubectl submission shows the contrasting declarative workflow: provide a manifest and let the Kubernetes API determine how to reach the described state. section 1.9













