- User Interaction:
- The user interacts with Kubernetes through the kubectl command-line interface.
Example:
$ kubectl get nodes NAME STATUS ROLES AGE VERSION k8s-master Ready control-plane 146d v1.28.1 k8s-worker-1 Ready worker 146d v1.28.1 k8s-worker-2 Ready <none> 47d v1.28.1 |
- Authentication and Validation:
- The kube-API Server authenticates the user’s request and validates it to ensure compliance with Kubernetes API schemas and policies.
- Data Retrieval from ETCD:
- Upon validation, the kube-API Server retrieves data from the ETCD cluster, which acts as the persistent storage for Kubernetes cluster state.
- Response to User:
- The kube-API Server responds to the user with the requested information or performs the requested operation (e.g., creating a pod).
- kube-Scheduler Assignment:
- If a user request involves creating a pod without specifying a node, the kube-Scheduler monitors the API-Server for new pod requests.
- It then assigns the appropriate node for the pod to run on based on scheduling policies.
- Communication with Kubelet:
- The kube-API Server updates the ETCD cluster with information about the newly created pod and its assigned node.
- It then communicates this information to the kubelet running on the appropriate worker node.
- POD Creation by Kubelet:
- The kubelet on the worker node receives instructions to create the pod.
- It interacts with the container runtime engine (e.g., Docker) to deploy the application image and create the pod.
- Status Update:
- Once the pod is created and running, the kubelet updates the pod’s status in the ETCD cluster via the kube-API Server.
- Continuous Process:
- This workflow repeats for every user request or cluster state change, ensuring consistency and proper management of the Kubernetes cluster.