Co to jest Kubernetes
Kubernetes (K8s) to system open-source do automatyzacji wdrażania, skalowania i zarządzania aplikacjami kontenerowymi.
Kubernetes, często w skrócie K8s, to platforma do orkiestracji kontenerów, która automatyzuje wdrażanie, skalowanie i zarządzanie aplikacjami kontenerowymi. Grupuje kontenery, które składają się na aplikację, w logiczne jednostki w celu łatwego zarządzania i wykrywania. Kubernetes zapewnia deklaratywne podejście do zarządzania aplikacjami, pozwalając użytkownikom definiować pożądany stan swoich aplikacji, a system działa w celu osiągnięcia tego stanu.
Opracowany początkowo przez Google, Kubernetes jest teraz utrzymywany przez Cloud Native Computing Foundation (CNCF). Obsługuje różne środowiska uruchomieniowe kontenerów, w tym Docker, containerd i CRI-O. Kubernetes został zaprojektowany tak, aby był wysoce rozszerzalny i może być używany do zarządzania aplikacjami w różnych środowiskach, od lokalnych centrów danych po chmury publiczne.
graph LR
Center["Co to jest Kubernetes"]:::main
Pre_docker["docker"]:::pre --> Center
click Pre_docker "/terms/docker"
Rel_container_orchestration["container-orchestration"]:::related -.-> Center
click Rel_container_orchestration "/terms/container-orchestration"
Rel_microservices["microservices"]:::related -.-> Center
click Rel_microservices "/terms/microservices"
Rel_devops["devops"]:::related -.-> Center
click Rel_devops "/terms/devops"
classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
linkStyle default stroke:#4b5563,stroke-width:2px;
🧠 Sprawdzenie wiedzy
🧒 Wyjaśnij jak 5-latkowi
🌍 Imagine a giant ship carrying thousands of shipping containers. Instead of one captain trying to keep track of every single box, Kubernetes is like a robot crew that automatically puts the boxes where they belong, fixes them if they break, and adds more ships if there are too many boxes.
🤓 Expert Deep Dive
## The Control Loop: Desired vs. Actual State
The heart of Kubernetes is the Controller Loop. It is a continuous process that:
1. Reads the Desired State (what you asked for in your YAML file).
2. Observes the Actual State (what is currently running in the cluster).
3. Takes action to fix any differences (e.g., pulling a new image or restarting a crashed Pod).
This 'Self-Healing' nature is what makes Kubernetes so powerful for running mission-critical software.