About consistency

Im new to whole Kubernetes and alike, but one thing that boogles me is that Ive heard that Pods (PODS or however you write it) are designed the way they are not consistent…

May I ask why it was designed that way? Its absurd:: someone spends (suppose) long time configuring/polishing instalation, disconnects (remember, we are in server world; so 99% of work is remote) from SSH, other person (from other country/continent) logs in and (not knowing what previous person did), restarts Kubernetes, and voila… work gone.

Or am I wrong?

Welcome to kubernetes!

I am not sure what you mean, here. Configured state is saved in the apiserver (in etcd, but that is a detail).

It’s not consistent in that the API might say something is configured, but that configuration has not propagated out to all the nodes or something. But that’s just reality.

Tim

I guess your mental model of Kubernetes needs to change a bit. Probably you are thinking about Kubernetes like Apache/Tomcat server that can be restarted from command-line by logging into a server. And naturally so you are worried that the resources that are running on it - Pods, Secrets, ConfigMaps - etc would be gone when it is restarted.

Well, that is not how you want to think about Kubernetes.

Kubernetes cluster is actually be a long running control plane which you as a user of it won’t be required to restart. Think of it similar to cloud services from GCP, AWS, Azure, etc. These services are accessible over HTTP and users only access them through the API.

As part of the control plane of Kubernetes there is a etcd key-value store. Any resource like Pod, Secret, etc. that is deployed on Kubernetes is saved to it. When you delete a Pod its state will be removed from etcd. But if you create a Pod and someone from other country/continent has access the same cluster, they will be able to see your Pod (after having the right permissions).

Does that provide good clarification?

Do you mean why pods are designed to be ephemeral?