Skip to main content

Kubernetes Cluster Components

KUBE-SCHEDULER

The scheduler continuously monitors the KUBE-API server for changes to cluster configuration, once a change is made the relevant data in the ETCD store is updated, and the changes are passed to the Kubelet on the relevant nodes.

The kube-scheduler will evaluate candidate nodes for a pod based on the pods requirements - ie pod requires 8x CPU cores, but a node only has 4 - this node wouldn't be appropriate.


KUBE-API Server

kubectl command is actually just making request to the kube-API server, which authenticates the request and retrieves the data from the ETCD store. The kube-API service is the ONLY kubernetes component that directly interacts with the ETCD store.


ETCD

ETCD is a control-plane component that acts as a key-value store for K8S. The data store is used to store information about and relating to the cluster, such as nodes, pods, configs, secrets, and more.

By default, ETCD listens on port 2379.

High Availability

In HA K8S environments, there are multiple master nodes, meaning multiple ETCD stores. In order for this configuration to work, you have to ensure that each ETCD service is aware of the others by .......

ETCD API

API Authentication

API Version

Commands differ between ETCD API versions. Check the version using etcdctl version, or etcdctl --version.

Commands

List available commands:

etcdctl
API V2

Manually set a key value:

etcdctl set key1 value1

Manually get a key value:

etcdctl get key1
API V3

Manually set a key value:

etcdctl put key1 value1

Manually get a key value:

etcdctl get key1

Kubelet

The kubelet is a service that runs on each worker node of a kubernetes cluster. The kubelet is responsible for orchestrating pods and workloads on a node via the container runtime engine. Once the kubelet service has made changes on a node, it relays the changes/status to the kube-API server, which then writes those changes to the ETCD store.