Learn
Why does it work that way?
There is a category of question documentation answers badly, because documentation describes behaviour and this asks about choice. That Pods are ephemeral is a fact you can look up in a minute. Why anyone would build it that way is the question that makes the fact stick, and it is almost never written down.
Each of these starts from the constraint that forced the design, then does something more useful than listing benefits: it describes what the system would look like if it had been built the other way. A constraint is invisible until you imagine violating it. Told that Kubernetes reconciles toward desired state, most people nod politely; shown what a command-based cluster does when a command is lost, the design stops seeming arbitrary.
Then the honest trade — what the choice buys and what it costs. Every one of these decisions cost something real, and a rationale that lists only the upside is marketing.
- Terraform
Why does Terraform need a state file at all?
Because your configuration says what should exist, and the cloud says what does exist, and neither tells you which real resource corresponds to which block of code. State is that mapping — and it is also the only record of things you asked for that the provider does not report back.
- Kubernetes
Why are Pods ephemeral?
Because a system that can replace a workload cannot also promise it will persist. Ephemerality is not a limitation Kubernetes imposes — it is the price of automatic recovery, and you cannot have one without the other.
- Kubernetes
Why does Kubernetes use desired state instead of commands?
Because over an unreliable network you cannot know whether a command arrived. Declaring the intended end state makes that uncertainty harmless — the same declaration can be applied any number of times and the result is identical.
- Docker
Why are containers not just lightweight virtual machines?
Because they share the host's kernel. A VM virtualises hardware and runs its own kernel; a container is an ordinary process with a restricted view of the same kernel everything else is using. Almost every practical difference follows from that one fact.
- CI/CD
Why can't you just remove a secret from Git after committing it?
Because git is built to remember. A commit is content-addressed and immutable, so deleting the file adds a new commit that removes it — while the original stays reachable, in your history and in every clone anybody already made.
- CI/CD
Why do CI/CD systems insist on immutable artifacts?
So that testing something means anything. If the artifact can change between the test and the deploy, then passing tests tells you about a thing that no longer exists.