O que é Kubernetes

Kubernetes (K8s) é um sistema de código aberto para automatizar a implantação, o dimensionamento e o gerenciamento de aplicações em contêineres.

Kubernetes, frequentemente abreviado como K8s, é uma plataforma de orquestração de contêineres que automatiza a implantação, o dimensionamento e o gerenciamento de aplicações em contêineres. Ele agrupa contêineres que compõem uma aplicação em unidades lógicas para facilitar o gerenciamento e a descoberta. Kubernetes fornece uma abordagem declarativa para gerenciar aplicações, permitindo que os usuários definam o estado desejado de suas aplicações, e o sistema trabalha para alcançar esse estado.

Desenvolvido inicialmente pelo Google, o Kubernetes agora é mantido pela Cloud Native Computing Foundation (CNCF). Ele suporta vários runtimes de contêineres, incluindo Docker, containerd e CRI-O. Kubernetes foi projetado para ser altamente extensível e pode ser usado para gerenciar aplicações em vários ambientes, desde data centers locais até nuvens públicas.

        graph LR
  Center["O que é 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;

      

🧠 Teste de conhecimento

1 / 3

🧒 Explique como se eu tivesse 5 anos

🌍 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.

🔗 Termos relacionados

Pré-requisitos:

📚 Fontes