Kubernetes
Describe the sequence of events in case of creating a ReplicaSet
Difficulty: unrated
Source: bregman-arie/devops-exercises
by Arie Bregman
Answer
- The client (e.g. kubectl) sends a request to the API server to create a ReplicaSet
- The Controller detects there is a new event requesting for a ReplicaSet
- The controller creates new Pod definitions (the exact number depends on what is defined in the ReplicaSet definition)
- The scheduler detects unassigned Pods and decides to which nodes to assign the Pods. This information sent to the API server
- Kubelet detects that two Pods were assigned to the node it's running on (as it constantly watching the API server)
- Kubelet sends requests to the container engine, to create the containers that are part of the Pod
- Kubelet sends a request to the API server to notify it the Pods were created