DevOps
Day 16 of DevOps learning π:
π Todayβs Focus: Kubernetes (K8)
- Key Takeaways from Kubernetes Learning:
-- Kubernetes Overview:
Kubernetes (K8) is an orchestration tool for automating the deployment, scaling, and management of containerized applications.
It works primarily with Docker as the container runtime.
- Core Features of Kubernetes:
-- High Availability: Ensures that applications are always accessible, even in the event of failures.
-- Scaling: Automatically adjusts the number of active containers based on load.
-- Management: Simplifies the management of applications through abstraction.
-- Self-Healing: Automatically replaces and reschedules containers that fail or become unresponsive.
-- Single Host Support: Can run on a single machine for development or testing purposes.
π Why is Kubernetes Powerful?
-- Decoupled Architecture: Applications can be composed of multiple microservices, allowing for better scalability and maintainability.
-- Resource Efficiency: Optimizes resource utilization by managing container placement based on available resources.
-- Declarative Configuration: Allows users to define the desired state of applications and infrastructure using YAML.
π Kubernetes Architecture:
-- Nodes: Kubernetes consists of two types of nodes:
-- Master Node: Controls the cluster and manages the API server, etcd, control manager, and scheduler.
-- Worker Nodes: Execute the workloads.
- Key Components of Each Node:
-- API Server: The central management entity that exposes the Kubernetes API.
-- ETCD: A distributed key-value store that holds the configuration data and state of the cluster.
-- Controller Manager: Regulates the state of the cluster by managing controllers.
-- Scheduler: Assigns workloads to worker nodes based on resource availability.
π Controllers:
- There are three primary controllers in Kubernetes:
-- Replication Controller: Ensures that a specified number of pod replicas are running.
-- Network Controller: Manages network connectivity and policies between pods.
-- Node Controller: Monitors the status of nodes and manages their lifecycle.
π Pods:
- The smallest deployable units in Kubernetes, which can hold one or more containers.
- Pods share network and storage resources, facilitating communication and data sharing between containers.
π YAML in Kubernetes:
- YAML (YAML Ain't Markup Language) is used for defining configurations in a human-readable format.
- Key-value pairs represent various configuration elements.
- YAML files are often referred to as manifest files in Kubernetes.
π Networking in Kubernetes:
- Networking in Kubernetes allows for communication between pods and external services.
- It is essential for service discovery, load balancing, and managing access.
π Kubernetes APIs:
- Kubernetes exposes a rich set of APIs for managing the lifecycle of applications and infrastructure.
- Common operations include creating, updating, and deleting resources through RESTful API calls.