What are the components of Kubernetes master and explain each component’s function?

Kubernetes master node contains 4 components kube-apiserver, etcd, kube-scheduler, kube-controller-manager

kube-apiserver
The API server is a component of the Kubernetes master node that exposes the Kubernetes API. The API server is the front end for the Kubernetes control plane.

etcd
Consistent and highly-available key value store used as Kubernetes' backing store for all cluster data.

kube-scheduler
Control plane component that watches for newly created Pods with no assigned node, and selects a node for them to run on.
Factors taken into account for scheduling decisions include: individual and collective resource requirements, hardware/software/policy constraints, affinity and anti-affinity specifications, data locality, inter-workload interference, and deadlines.

kube-controller-manager
Manager/Controller of Controllers such as Node Controller, Endpoint controller, Namespace controller etc. Helps maintain the desired state.