Posts

Basic -- Kubernetes:

  What is Kubernetes? Answer : Kubernetes is an open-source container orchestration platform that automates deploying, scaling, and managing containerized applications. It provides tools for managing microservices, load balancing, automated scaling, and self-healing in production environments. What are the main components of Kubernetes? Answer : Kubernetes consists of the following main components: Master Node : Controls the Kubernetes cluster, running the API server, scheduler, and controller manager. Worker Nodes : Hosts the containers (pods), including the container runtime (like Docker), kubelet, and kube-proxy. API Server : Exposes the Kubernetes API, which is the entry point for interactions with the cluster. Scheduler : Assigns workloads (pods) to nodes based on resource availability. Controller Manager : Ensures the desired state of the cluster (e.g., ensures that the number of pods running is the same as desired). Etcd : A distributed key-value stor...

Docker & Container D | ctr | nerdctl | crictl

The topic Docker vs containerd is really about understanding how modern container systems are structured. Docker used to be the “all-in-one” tool, while containerd is a lower-level component that Docker itself now relies on. 🐳 What is Docker? Docker is a full platform for building, running, and managing containers. Think of Docker as a complete toolkit : Build container images ( Dockerfile ) Run containers ( docker run ) Manage networks, volumes, etc. CLI + API + ecosystem It’s designed to be developer-friendly and easy to use. ⚙️ What is containerd? containerd is a core container runtime . It handles the essential low-level tasks: Pulling images Managing container lifecycle (start, stop) Handling storage and execution It does not include: Image building tools Fancy CLI for developers High-level orchestration features The Open Container Initiative (OCI) is a project under the Linux Foundation that aims to create open standards for container formats...

Containerd

  Working with Containerd Containerd is a high-level container runtime that provides the basic functionalities required to run and manage containers. It is more lightweight and low-level compared to Docker and is often used by container orchestration systems like Kubernetes. Containerd is capable of handling tasks like image pulling, container execution, and managing the container lifecycle, but it doesn't include higher-level features like orchestration or image building. If you're looking to work with containerd , the main interaction is through its gRPC API , although there are CLI tools that provide a more user-friendly way to interact with it. Basic Concepts of Containerd Containerd Daemon : The containerd daemon ( containerd.service or containerd process) is the core service that runs on your machine and handles container management tasks like running containers and pulling images. Containers : Containerd handles the lifecycle of containers, including crea...

Kubernetes Architecture

  Kubernetes architecture is a system designed to manage containerized applications across clusters of machines. It provides a framework to run distributed systems resiliently, with scaling, failover, and deployment patterns. Here's an overview of the key components and concepts involved in Kubernetes architecture: Key Components of Kubernetes Architecture Cluster : A Kubernetes cluster is made up of a control plane and a set of worker nodes (also known as the node pool ). Control Plane : Manages the overall cluster and makes global decisions about the cluster, such as scheduling, scaling, and networking. Worker Nodes : These are the machines (virtual or physical) where the containers are actually run. Control Plane Components : The control plane is responsible for maintaining the overall state of the cluster and making decisions about the cluster (like scheduling, networking, etc.). The main components are: API Server ( kube-apiserver ): The API server is the ent...

Prometheus

  1. Prometheus ConfigMap This ConfigMap contains the configuration for Prometheus, defining which services it will scrape metrics from. apiVersion: v1 kind: ConfigMap metadata:   name: prometheus-config   namespace: monitoring   labels:     app: prometheus data:   prometheus.yml: |     global:       scrape_interval: 15s     scrape_configs:       - job_name: 'kubernetes-apiservers'         kubernetes_sd_configs:         - role: endpoints         scheme: https         tls_config:           ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt           insecure_skip_verify: true         bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token         relabel_configs:         - source_labels: [__m...