All technological notes.
kuberneteskubernetes
Greek for helmsman
Cloud Native Computing Foundation (CNCF)Feature
Kubernetes cluster consists of nodes divided into two groups:
master nodes
Control Plane components, which are the brains of the system, since they control the entire cluster.worker nodes
Workload Plane, which is where your workloads (or applications) run.the process of deploying the application:
API. The API Server writes the objects defined in the manifest to etcd.controller notices the newly created objects and creates several new objects - one for each application instance.Scheduler assigns a node to each instance.Kubelet notices that an instance is assigned to the Kubelet’s node. It runs the application instance via the Container Runtime.Kube Proxy notices that the application instances are ready to accept connections from clients and configures a load balancer for them.Kubelets and the Controllers monitor the system and keep the applications running.Virtualization
virtual machines, each with its own operating system.Containerization
container, isolated environment running on a shared operating system.Orchestration
| Aspect | Virtualization | Containerization | Orchestration |
|---|---|---|---|
| Level of Abstraction | Hardware / OS | Application / runtime | Infrastructure management |
| Isolation Target | Operating systems | Applications | Application operations |
| Overhead | High (each VM runs its own OS) | Low (containers share the host OS kernel) | Variable |
Microservices
monolithic architectures
| Service | description |
|---|---|
| Voting service | Receive votes from users |
| Cache service | Cache vote data |
| backend service | handle vote transaction |
| database service | persist vote data |
| result service | return vote data |


Declarative Programming
Imperative Programming
Functional Programming
declarative programming where computation is treated as the evaluation of mathematical functions without changing state or mutable data.Procedural Programming
imperative programming that organizes code into procedures (functions or routines).Object-Oriented Programming (OOP)
objects
Categorization
Imperative (broad category: how to do it)
ProceduralObject-OrientedDeclarative (broad category: what to achieve)
FunctionalKubernetes controllers work continuously to reconcile the actual state with the desired state.Imperative Approach in k8s
kubectl runkubectl createkubectl exposekubectl editCategories:
Declarative Approach in k8s
Container Runtime Interface (CRI)
kubelet (Kubernetes node agent) communicate with various container runtimes (like containerd, CRI-O) to manage container lifecycles (pulling images, starting/stopping containers) without needing specific code for each.OCI-compliant container runtime:
rktrunC: The foundational, low-level tool that directly interacts with the OS to create and run containerscontainerd: high-level runtime that manages the full container lifecycle, runcCRI-O: a lightweight container runtime specifically built for Kubernetespodman: A daemonless alternative to DockerKata Containers: Provides strong isolation by running containers inside lightweight virtual machines, enhancing security.