Let's take a simple example.
Suppose you want to run a web application with three replicas.
You define the desired state:
replicas: 3
Then you submit the configuration to Kubernetes.
Something like:
kubectl apply -f deployment.yaml
The flow is roughly:
Developer
|
v
kubectl
|
v
API Server
|
v
Scheduler / Controllers
|
v
Worker Node
|
v
Pod
|
v
Container
- The scheduler decides where the Pod should run.
- The kubelet on that node makes sure the Pod is running.
- The controllers continue watching the state of the cluster.
- If something changes, Kubernetes works to move the actual state back toward the desired state.
No comments:
Post a Comment