DEV Community

Cover image for Kubernetes Interview Questions: Kubernetes Components
Dmitrii Kotov
Dmitrii Kotov

Posted on • Updated on

Kubernetes Interview Questions: Kubernetes Components

What does a Kubernetes cluster consist of?

A Kubernetes cluster consists of a set of worker machines, called nodes, that run containerized applications.

What is the minimum number of worker nodes a Kubernetes cluster can have?

Every cluster has at least one worker node.

What do the worker nodes in a Kubernetes cluster host?

The worker node(s) host the pods that are the components of the application workload.

Who manages the worker nodes and the Pods in a Kubernetes cluster?

The control plane manages the worker nodes and the Pods in the cluster.

Can control plane components be run on any machine in the cluster?

Yes, control plane components can be run on any machine in the cluster.

Are user containers run on the machine hosting the control plane components?

No, user containers are not run on the machine hosting the control plane components.

What are the components of a control plane?

kube-apiserver, etcd, kube-scheduler, kube-controller-manager, cloud-controller-manager,

What is the kube-apiserver?

The kube-apiserver is the main implementation of a Kubernetes API server, which is a component of the Kubernetes control plane.

What role does the API server play in the Kubernetes control plane?

The API server is the front end for the Kubernetes control plane and exposes the Kubernetes API.

Can you run multiple instances of kube-apiserver?

Yes, you can run several instances of kube-apiserver and balance traffic between those instances.

What is etcd in the context of Kubernetes?

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

What is the kube-scheduler?

kube-scheduler is a control plane component that watches for newly created Pods with no assigned node, and selects a node for them to run on.

What factors are considered in the kube-scheduler's scheduling decisions?

Factors considered include individual and collective resource requirements, hardware/software/policy constraints, affinity and anti-affinity specifications, data locality, inter-workload interference, and deadlines.

What is the kube-controller-manager?

kube-controller-manager is a control plane component that runs controller processes.

How are the controllers in kube-controller-manager implemented to reduce complexity

To reduce complexity, all the controllers are compiled into a single binary and run in a single process.

What is the responsibility of the Node controller in kube-controller-manager?

The Node controller is responsible for noticing and responding when nodes go down.

What does the Job controller do?

The Job controller watches for Job objects that represent one-off tasks, then creates Pods to run those tasks to completion.

What is the role of the EndpointSlice controller?

The EndpointSlice controller populates EndpointSlice objects, which provide a link between Services and Pods.

What function does the ServiceAccount controller perform?

The ServiceAccount controller creates default ServiceAccounts for new namespaces.

What are the components of a Worker Node?

kubelet, kube-proxy, container runtime

What is the kubelet?

The kubelet is an agent that runs on each node in the cluster and ensures that containers are running in a Pod.

What is the primary function of the kubelet?

The primary function of the kubelet is to take a set of PodSpecs, provided through various mechanisms, and ensure that the containers described in those PodSpecs are running and healthy.

Does the kubelet manage all containers on a node?

No, the kubelet does not manage containers that were not created by Kubernetes.

What is kube-proxy?

kube-proxy is a network proxy that runs on each node in your cluster, implementing part of the Kubernetes Service concept.

What is the primary role of kube-proxy in a Kubernetes cluster?

The primary role of kube-proxy is to maintain network rules on nodes.

How does kube-proxy manage network traffic?

kube-proxy uses the operating system packet filtering layer if it is available. If not, kube-proxy forwards the traffic itself.

What is a container runtime in the context of Kubernetes?

A container runtime is a fundamental component that empowers Kubernetes to run containers effectively.

What are the responsibilities of a container runtime within the Kubernetes environment?

It is responsible for managing the execution and lifecycle of containers.

Does Kubernetes support multiple container runtimes?

Yes, Kubernetes supports container runtimes such as containerd, CRI-O, and any other implementation of the Kubernetes CRI (Container Runtime Interface).

What are addons in Kubernetes?

Addons use Kubernetes resources (DaemonSet, Deployment, etc) to implement cluster features.

Where should namespaced resources for addons be located?

Namespaced resources for addons belong within the kube-system namespace as they provide cluster-level features.

How can one find more information about available addons?

For an extended list of available addons, you can refer to the section titled "Addons" in the relevant Kubernetes documentation.

Top comments (0)