Kubernetesとは?
Kubernetes (K8s) は、コンテナ化されたアプリケーションのデプロイ、スケーリング、管理を自動化するためのオープンソースシステムです。
Kubernetes(K8sと略されることが多い)は、コンテナ化されたアプリケーションのデプロイ、スケーリング、管理を自動化するコンテナオーケストレーションプラットフォームです。アプリケーションを構成するコンテナを、管理と検出を容易にする論理ユニットにグループ化します。Kubernetesは、アプリケーションの管理に宣言的なアプローチを提供し、ユーザーがアプリケーションの望ましい状態を定義できるようにし、システムはその状態を達成するために機能します。
元々はGoogleによって開発され、現在はCloud Native Computing Foundation (CNCF) によって保守されています。Docker、containerd、CRI-Oなど、さまざまなコンテナランタイムをサポートしています。Kubernetesは高度な拡張性を備えており、オンプレミスデータセンターからパブリッククラウドまで、さまざまな環境でアプリケーションを管理するために使用できます。
graph LR
Center["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;
🧠 理解度チェック
🧒 5歳でもわかるように説明
🌍 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.