Primary Responsibilities of the Workstation in a Kubernetes Cluster
The workstation acts as the control interface for managing and interacting with the Kubernetes cluster. It is typically used to write, test, and apply configuration files, manage deployments, and monitor cluster resources. Common tools used from the workstation include:
kubectl – the CLI to interact with the cluster.
kubeadm – for initializing and managing cluster setup.
helm – for package management and deploying pre-configured applications.
YAML editors or IDEs – for writing Kubernetes manifests.
Four Core Components That Run as Pods on the Kubernetes Master Node
On the Kubernetes master node, the following essential components run as Pods:
kube-apiserver – handles all REST API requests to the cluster.
etcd – stores the cluster’s configuration and state data.
kube-scheduler – assigns Pods to nodes based on resource availability.
kube-controller-manager – runs background controllers to maintain cluster state.
Command to Initialize Kubernetes Master Node and Required Tools
To initialize the master node, the command used is:
bash
Copy
Edit
kubeadm init
Both master and worker nodes must have the following tools installed:
kubeadm – to bootstrap the cluster.
kubelet – runs on all nodes to manage containers.
kubectl – used for cluster interaction (typically from the workstation).
Difference Between Adding a Master Node and a Worker Node
Adding a worker node involves joining it to the cluster using the kubeadm join command with a token and IP of the master. Adding a master node is more involved, requiring the use of the --control-plane flag with kubeadm join, and may also need to share certificates and etcd data to enable HA (High Availability) control planes.
Function of kube-proxy and Where It Runs
kube-proxy is responsible for network communication within the cluster. It manages routing rules and handles traffic forwarding to the appropriate Pods based on Kubernetes Services. It runs on every node in the cluster, both master and worker nodes, to ensure consistent service networking.