K8s – Question8

Use context: kubectl config use-context k8s-c1-H

Ssh into the controlplane node with ssh cluster1-controlplane1. Check how the controlplane components kubelet, kube-apiserver, kube-scheduler, kube-controller-manager and etcd are started/installed on the controlplane node. Also find out the name of the DNS application and how it’s started/installed on the controlplane node.

Write your findings into file /opt/course/8/controlplane-components.txt. The file should be structured like:

Choices of [TYPE] are: not-installedprocessstatic-podpod

Investigating Control Plane Components in a Kubernetes Cluster

Understanding how control plane components are managed in a Kubernetes cluster is essential for effective troubleshooting and maintenance. In this guide, we’ll explore how to identify and investigate the control plane components, such as kubelet, etcd, and coredns, in a running Kubernetes cluster.

Step 1: Checking the Kubelet Process

We begin by logging into the control plane node and checking for the kubelet process. This can be done using SSH and the ps command:

This command will display the kubelet process running on the node.

Step 2: Identifying Systemd Services

Next, we’ll check which Kubernetes components are managed via systemd by searching the /usr/lib/systemd directory:

This output shows that the kubelet service is controlled via systemd. However, no other services, like etcd, are managed this way.

Step 3: Investigating Static Pods

Since the cluster seems to have been set up using kubeadm, the core control plane components are likely running as static Pods. We can confirm this by checking the default manifest directory:

This directory contains YAML files for the kube-controller-manager, etcd, kube-apiserver, and kube-scheduler, indicating they are configured as static Pods.

Step 4: Checking Running Pods in kube-system Namespace

To see all the Pods running on the control plane node, use the following command:

This command shows the 5 main static Pods running on the control plane node.

Step 5: Investigating the DNS Component

The DNS component in this cluster seems to be coredns. To determine how it is controlled, we can check the DaemonSets and Deployments in the kube-system namespace:

The coredns component is managed via a Deployment.

Step 6: Summarizing the Findings

We can summarize our findings in a text file as follows:

This file shows the management method for each control plane component, helping you understand how the cluster is set up.

By following these steps, you can effectively investigate the control plane components of a Kubernetes cluster, identify how they are managed, and be better prepared to troubleshoot any issues that arise.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *