๐Ÿ“˜ K8s Summary Guide

๐Ÿ“˜ K8s Summary Guide



I. Core Concepts

1. Cluster
A group of nodes managed by the Kubernetes control plane.

2. Node
A worker machine in Kubernetes, can be virtual or physical.

Control Plane Node: Manages the cluster.

Worker Node: Runs application workloads (pods).

3. Pod
The smallest deployable unit; contains one or more containers.

4. Container
A lightweight, isolated executable unit (e.g., Docker container) that runs inside a Pod.


II. Control Plane Components (Run on master node)

1. kube-apiserver
Front-end of the Kubernetes control plane; exposes the Kubernetes API.

2. etcd
Distributed key-value store for all cluster data.

3. kube-scheduler
Assigns pods to nodes based on available resources and constraints.

4. kube-controller-manager
Runs controllers that regulate the state of the system (e.g., replication, endpoints).

5. cloud-controller-manager
Integrates cloud provider-specific control logic (like attaching load balancers).


III. Node Components (Run on each worker node)

1. kubelet
Ensures that containers are running in a pod.

2. kube-proxy
Maintains network rules for pod communication and manages traffic routing.

3. Container Runtime
Software that runs containers (e.g., Docker, containerd, CRI-O).


IV. Kubernetes Objects

1. Deployment
Manages ReplicaSets and enables rolling updates.

2. ReplicaSet
Maintains a stable set of replica Pods.

3. StatefulSet
Like Deployments but for stateful apps; provides stable identity and storage.

4. DaemonSet
Ensures a copy of a pod runs on all (or some) nodes.

5. Job
Runs pods to completion for batch jobs.

6. CronJob
Schedules jobs to run periodically, like a cron task.


V. Networking

1. Service
Exposes pods as a network service.

Types: ClusterIP, NodePort, LoadBalancer, ExternalName.

2. Ingress
Manages external HTTP/HTTPS access to services. Requires an Ingress Controller.

3. NetworkPolicy
Controls network traffic between pods.


VI. Security & Identity

1. Namespaces
Isolate resources within the same cluster.

2. ServiceAccount
Provides identity to pods for API access.

3. RBAC (Role-Based Access Control)
Controls who can access what in the Kubernetes API.


VII. Storage

1. Volume
Storage inside a pod (e.g., emptyDir, hostPath).

2. PersistentVolume (PV)
Cluster-managed storage resource.

3. PersistentVolumeClaim (PVC)
A request for storage by a user or pod.

4. StorageClass
Defines types of storage (e.g., SSD, slow disks).


VIII. Configuration Management

1. ConfigMap
Stores non-sensitive configuration data for pods.

2. Secret
Stores sensitive data like passwords or tokens.


IX. Monitoring & Logging

1. Metrics Server
Collects metrics used by autoscalers.

2. Logging Tools
E.g., Fluentd, Elastic Stack for centralized log aggregation.

3. Probes

Liveness Probe: Restarts the container if failed.

Readiness Probe: Only sends traffic if the app is ready.

Startup Probe: For slow-starting apps.


X. Autoscaling

1. Horizontal Pod Autoscaler (HPA)
Scales pod replicas based on CPU/memory usage.

2. Vertical Pod Autoscaler (VPA)
Adjusts CPU/memory requests for pods.

3. Cluster Autoscaler
Adjusts the number of nodes in the cluster.


XI. Helm (Optional: Package Management)

1. Helm
A package manager for Kubernetes. Uses charts to install and manage applications.


Comments

Popular posts from this blog

SAVE TAX ๐Ÿ’ต

LIFE A JOURNEY

๐ŸฆŸ The Truth About Mosquitoes: More Than Just an Itchy Bite