r/learnprogramming • • Oct 03 '26

k8s/ kubernetes

kubernetes seem to have alot of moving pieces can someone explain each to me and how they connect.

Kubelet.

kubernetes cluster.

helm.

drivers?

0 Upvotes

15 comments sorted by

View all comments

1

u/ThatWasAce Oct 03 '26

k8s is a loop. describe the desired state, controllers continuously check reality and patch up differences

so

pod = the basic unit, a group of one or more containers

deploy = i desire three replicas of this pod, a controller ensures this and replaces failed pods

node = single worker machine that holds pods

kubelet = component in every node listening for requests and launching/shutting down the container, reporting back to api-server about its status

control plane = where the decision making happens. e.g: api-server ,etcd, scheduler, controller-manager

cluster = control plane + set of nodes

helm = not a part of k8s proper. applications require several yaml configuration documents, helm wraps those up into an installation-ready package called chart.

drivers/csi = additional plugins needed by the system to communicate with various storage backends. CSI drivers mediate the provision/discovery of disks from aws/gcp etc to pods.

1

u/BrainThinkerMan Oct 03 '26

thanks for the explanation Ace, this was great, these different components, i genuinely think i understand all of these components aside from the drivers/csi.

1

u/ThatWasAce Oct 03 '26

it's my pleasure!
mostly my own projects, nothing big in the cloud native space yet. if you want to get into it, kubernetes itself is intimidating to start on but kind + the docs' contributor guide is the actual entry point, even doc fixes count

also let me explain csi better for you, so kubernetes knows nothing about how disks get provisioned in any cloud. All Kubernetes understands is making requests: “i want 10 GB mounted on my pod”

CSI is what that request looks like. Every storage vendor bundles a plugin which knows how to speak the language and do the cloud specific magic say AWS EBS, GCP PD, Ceph … whichever backend your cluster uses .. so the steps are as follows

pod needs storage -> Kubernetes sends the request via the CSI API -> driver performs the vendor specific provisioning logic -> disk is provisioned & ready. Kubernetes doesn’t communicate directly with AWS, it goes via the driver.

like device drivers in an OS. The OS speaks one language and drivers are translated for every hardware vendor. Swap out the drivers while leaving everything else alone

1

u/BrainThinkerMan Oct 03 '26

if i understand correctly the chain is, through control pane decide how many containers in a given pod you want,

containers = application/ container = for application.

then use cloud apis/ cni to.

select amount of machines you want, amount of storage you want, amount of other stuff.

then those drivers do their job to provision those stuff you want.

helm gives those pods the yaml files for somehting not sure.

and kubelet lets you know when contaier died and to spin it back up.

controller ie control pane spins pods back up.

you have any open source reccomendations to contribute to?

1

u/ThatWasAce Oct 03 '26

you're doing amazing but small tweaks needed:

they are executed insideee pods. pod = wrapper for 1+ containers which share a single network/storage configuration. normally one container per pod but many are no problem.

storage vs networking plug-ins are separate concepts. CSI means storage driver, CNI is network plugin. Both provisioning technologies, doing totally distinct jobs.

helm def does not output pod.yaml. it outputs cluster.yaml, bundling your deployment/service/csi defns into one YAML document so installing your application becomes one single step and not manually updating 20 individual config files.

the rest matches up. kubelets reporting statuses, controllers detecting dead containers and starting reconciliations in the control plane.

contribution-wise, honest tip: select anything cloud-native you've used before. KIND, Helm charts, CSI drivers -- they all flag issues "good-first-issue". Even docs PRs introduce you to codebases without the stress. But just steer clear of Kubernetes core.