¿QUE ES KUBERNETES? - Introducción al orquestador más usado
Summary
TLDRThis video offers an introductory explanation of Kubernetes, a container orchestration tool created by Google and now open source. It discusses Kubernetes' ability to manage applications across multiple servers, ensuring high availability and reducing downtime through application replication. The script covers the basic architecture, including Masters and Workers, and introduces key components like the API server, controller manager, and scheduler. It also explains the concept of Pods, Services, and the use of declarative manifests for application deployment, highlighting Kubernetes' role in simplifying container management at scale.
Takeaways
- 😀 Kubernetes is a tool for managing containerized applications across multiple servers, simplifying deployment and scaling.
- 🔧 Docker is used to create containerized applications, ensuring they run the same way on any machine, avoiding 'it works on my machine' problems.
- 👨💻 Developers can focus on creating and modifying applications without needing to coordinate with system administrators for configuration.
- 🚀 Kubernetes was created by Google and is now open-source, allowing anyone to download, modify, and improve it.
- 🌐 Kubernetes solves the problem of managing a large number of containers across many nodes, providing high availability and reducing downtime.
- 🔄 High availability in Kubernetes is achieved by creating replicas of applications, ensuring traffic is redirected to functioning copies if one fails.
- 📈 Scalability is managed by Kubernetes, allowing for the creation of additional application copies to handle increased traffic or capacity needs.
- 🛠 Kubernetes architecture consists of two main groups: Masters and Workers, with the Masters running several components like the API server, controller manager, and scheduler.
- 📦 Pods in Kubernetes are sets of containers that share a network space and IP, typically running a single container each but can run more for task division.
- 🔗 An overlay network in Kubernetes allows pods to communicate across different nodes, facilitating inter-pod communication regardless of their location.
- 🌐 Services in Kubernetes provide a stable way to access applications, with different types like ClusterIP, NodePort, LoadBalancer, and Ingress to manage traffic.
Q & A
What is the main topic of the video?
-The main topic of the video is Kubernetes, explaining what it is, its purpose, and how it works.
What is Docker and how does it relate to Kubernetes?
-Docker is a tool that allows you to run applications in containers, ensuring that the application runs the same way on any machine. It is related to Kubernetes as Kubernetes is an orchestration tool for managing Docker containers across multiple servers.
What problem does Kubernetes solve that Docker does not?
-Kubernetes solves the problem of managing containers across many servers, providing high availability, scaling, and disaster recovery, which Docker does not handle on its own.
What is an orchestrator in the context of container management?
-An orchestrator is a tool that manages the deployment, scaling, and operations of application containers across a cluster of hosts.
Who originally created Kubernetes and what is its current status?
-Kubernetes was originally created by Google and is now an open-source project that anyone can download, use, and modify.
What does Kubernetes provide in terms of application management?
-Kubernetes provides high availability by creating replicas of applications, scaling capabilities to handle varying traffic, and disaster recovery through its declarative manifests.
What are the two main components of a Kubernetes architecture?
-The two main components of a Kubernetes architecture are the Masters and the Workers. The Masters manage the cluster, while the Workers run the applications in containers.
What is a Pod in Kubernetes and why are they considered volatile?
-A Pod in Kubernetes is a set of containers that share a network space and have a single IP. They are considered volatile because they can be destroyed and recreated during deployments, such as version updates.
What is a Service in Kubernetes and why is it used?
-A Service in Kubernetes is an abstraction that defines a logical set of Pods and a policy by which to access them. It is used to provide a stable endpoint for accessing the Pods, which are otherwise volatile.
What are some types of Services in Kubernetes?
-Some types of Services in Kubernetes include ClusterIP, NodePort, LoadBalancer, and Ingress, each providing different methods of accessing the Pods.
How does Kubernetes handle the creation and management of Pods?
-Kubernetes uses deployments, which are templates for creating Pods. When a deployment is applied to a Kubernetes cluster, the controller manager takes care of creating the Pods according to the template.
Outlines
📚 Introduction to Kubernetes
This paragraph introduces the topic of Kubernetes, explaining its purpose and basic functionality. It mentions that Kubernetes is a tool for managing containerized applications across multiple servers, ensuring high availability and scalability. The speaker compares it to Docker, which is used for running applications in containers but lacks the orchestration capabilities that Kubernetes provides. Kubernetes was created by Google and is now an open-source project, allowing anyone to download, modify, and improve it. The paragraph also touches on the high-level architecture of Kubernetes, including the roles of Masters and Workers, and the use of agents, the API server, controller manager, and scheduler within the system.
🔧 Deep Dive into Kubernetes Features and Architecture
The second paragraph delves deeper into Kubernetes' features, discussing its architecture and the components that make it function effectively. It explains the concept of Pods, which are groups of containers that share a network namespace and IP, and the volatility of Pods, which are destroyed and recreated during deployments. The paragraph also introduces Services in Kubernetes, which provide a stable entry point to access applications running in Pods, and mentions different types of services like ClusterIP, LoadBalancer, Ingress, and NodePort. The speaker emphasizes the use of declarative manifests for managing the state of the cluster, allowing for easy recovery and scaling of applications. The paragraph concludes with a mention of the practicality of running Kubernetes in various cloud environments and the ease of setting it up locally for practice.
Mindmap
Keywords
💡Kubernetes
💡Containerization
💡Orchestration
💡High Availability
💡Pods
💡Services
💡Deployment
💡Manifests
💡Etcd
💡API Server
💡Controller Manager
Highlights
Introduction to Kubernetes, explaining its purpose and how it differs from Docker and Docker Swarm.
Docker as a tool for running applications in a containerized manner, ensuring consistent application behavior across different environments.
The challenge of managing containers across multiple servers and the need for an orchestrator to handle this complexity.
Kubernetes as a container orchestration tool created by Google and now open-sourced for community contributions.
Kubernetes' primary function of managing containers across multiple nodes and providing high availability and reducing downtime.
The concept of creating application replicas in Kubernetes to ensure high availability and seamless traffic redirection in case of failures.
Kubernetes' ability to scale applications by creating additional copies to handle increased traffic or capacity needs.
The role of Kubernetes in disaster recovery, simplifying the process of recreating lost applications based on declarative manifests.
Overview of Kubernetes architecture, distinguishing between Masters and Workers, and the function of each component.
Explanation of 'kubelet', the Kubernetes agent that runs on each worker node.
The function of the API server in Kubernetes, which exposes an interface for various clients to interact with the cluster.
The role of the controller manager in monitoring the cluster and ensuring the correct number of containers are running.
The scheduler's responsibility for placing pods based on the instructions from the controller manager.
The use of etcd as the database for storing the state and configurations of the Kubernetes cluster.
Definition and explanation of 'pods' in Kubernetes, which are sets of containers sharing a network namespace.
The volatility of pods and the process of creating new ones during deployment updates.
Introduction to Kubernetes services, which provide a stable entry point to access applications running in pods.
Different types of Kubernetes services, such as ClusterIP, NodePort, LoadBalancer, and Ingress, and their respective use cases.
The importance of Kubernetes' declarative manifests for defining and managing application deployment templates.
Practical advice on when to use Kubernetes in a business environment based on the scale and needs of the operation.
Availability of various Kubernetes providers and the ease of running Kubernetes with the support of cloud services like Digital Ocean, Google Cloud, and Amazon.
A personal account of using Kubernetes in a large-scale operation with approximately 3,000 servers running 100 pods each.
Comparison between using Kubernetes and managing containers with OpenStack's LXD, highlighting the impracticality of the latter for production environments.
Transcripts
Bueno hoy vamos a hablar de kubernetes y
vamos a explicar qué es lo que es voy a
hacer este video Porque mucha gente ha
visto mis otros videos donde son un poco
más avanzados y tal vez no saben bien
Qué es kubernetes y para qué sirve ya
hice un video hace un par de semanas
sobre las diferencias entre kubernetes
docker y docker swarm y vamos a hacer
una pequeña introducción de kubernetes
para que puedas entender bien cómo
funciona y de ahí pasar a los siguientes
videos en donde vas a aprender cómo
usarlo
[Música]
vamos
esta altura ya imagino que sabes lo que
es docker no docker es una herramienta
que te permite correr tus aplicaciones
de una forma contenerizada contenedores
como un contenedor y te permite crear
imágenes para mover esa imagen en
cualquier máquina y levantar esa
aplicación con el entorno de todas las
librerías que necesita y todos los
archivos que necesita dentro de esa
misma imagen Esto está bueno porque te
aseguras de que cuando corres tu
aplicación en docker en tu máquina va a
funcionar Exactamente igual que si la
corres en un un servidor o en la máquina
de un compañero y esto obviamente sirve
para evitar ese típico problema de
funciona mi máquina no funciona en el
servidor y aparte podes mover ese
trabajo de crear esa imagen crear todo
ese entorno para la aplicación a los
desarrolladores Entonces los
desarrolladores pueden hacer esos
cambios sin tener que estar liando con
hablar con la gente de sistemas para
configurar la aplicación obviamente como
dije recién este estos contenedores los
puedes correr no solamente en tu máquina
sino que lo puedes correr en servidores
Pero qué pasa si tenés que manejar esos
contenedores en muchos servidores tal
vez en decenas cientos o incluso miles
de servidores te imaginas que manejar
todo eso es muy difícil para la gente de
sistemas por lo que lo que necesitas es
un orquestador un orquestador es lo que
te permite manejar esas aplicaciones
dentro de contenedores a través de
muchos servidores esos servidores pueden
ser virtuales pueden ser físicos pueden
ser lo que sea kubernet Es una
herramienta de orquestación de
contenedores fue creada por Google
actualmente es Open source por la que
cualquier persona puede no solamente
descargarlo sino modificarlo y y hacerlo
mejor el principal problema problema que
resuelve kubernetes es la posibilidad de
manejar muchos contenedores a través de
muchos nodos no solamente te da eso sino
que también te da alta disponibilidad y
quita downtime la forma en que
kubernetes brinda esa alta
disponibilidad es creando réplicas de tu
aplicación Sí entonces vos puedes tener
varias copias de tu aplicación y si una
de esas copias deja de funcionar
kubernetes va a mandar el tráfico a la
que está funcionando todo esto de forma
transparente para el usuario que está
visitando tu aplicación también te
permite escalar o sea crear copias de tu
aplicación en en el caso de que tengas
más tráfico o que quieras por alguna
razón tener más capacidad para recibir
ese tráfico también se encarga de todo
lo que es disaster recovery ya que es
muy fácil volver a crear las
aplicaciones que se murieron porque todo
es basado en manifiestos declarativos
veamos un poquito la arquitectura de
kubernetes kubernetes tiene básicamente
dos grandes grupos los Masters y los
workers cada worker corre un agente de
kubernetes que se llama cubet en los
Masters tenemos varios componentes entre
ellos está el Api server el Api o Api
server la que se encarga de exponer una
interfaz para que diferentes clientes
puedan interactuar con kubernetes por
ejemplo interfaces web eh otros clientes
que hacen llamadas a la Api o el cliente
de kubernet que se llama cub ctl el
controller manager es el que maneja lo
que pasa en el clúster sí está todo el
tiempo al tanto de los contenedores que
están corriendo y los contenedores que
tienen que estar corriendo el scheduler
lo que hace es recibir las órdenes del
controller manager y mueve los pots de
lugar en lugar todo Esto va guardado en
una base de datos eh que se llama etcd
esa base de datos no solamente tiene el
Estado de tu clúster de kubernetes sino
que tiene toda la información y todas
las configuraciones de tu claser en los
nodos o los workers es donde vamos a
correr los pots de tu aplicación un Pot
es un set de contenedores que tiene un
solo IP o mejor dicho comparten el nam
space de red lo más normal es correr un
solo contenedor en cada Pot Pero hay
casos donde corres más de uno ya que
podes dividir algunas tareas lo que hay
que tener en cuenta es que estos pots
son volátiles o sea cuando haces un
deploy por ejemplo para cambiar la
versión los pots se destruyen y se crea
uno nuevo a través de todos nuestros
nodos tenemos algo que se le llama una
overlay Network que lo que permite Es
compartir una red entre todos los pods
no importa en qué nodo estén sí Entonces
el pod a puede llegar al pod B Por más
que estén en diferentes nodos como dije
recién esos pods son volátiles por lo
que no es una muy buena idea apuntarle a
la ip de un pod para llegar a él lo que
se hace Generalmente es crear algo que
se llama servicio un servicio de
kubernetes hay vari tipos de servicios
pero los más comunes son los que se
llaman claser IP que se caracterizan por
tener un IP que nunca cambia entonces en
lugar de ir de pod a pod vas de un pod a
un servicio y ese servicio tiene como
backend los pods que corren tu
aplicación el servicio encuentra esos
pots basado en un set de reglas o
etiquetas que vos le pones a tus pots
para que el servicio los pueda encontrar
como dije hay varios tipos de servicios
por ejemplo tipo load balancer tipo
ingress tipo cluster IP y tipo Note Port
Estos son diferentes formas de crear
servicios notebo por ejemplo te permite
crear un puerto en el nodo que va a
llegar a tu tráfico ingress te permite
crear reglas basadas en en el subdominio
por ejemplo y lo balancer te permite
crear un balanceador de carga en tu
proveedor Cloud ya sea Amazon digital
Ocean o Google como dije kubernetes se
maneja con manifiestos declarativos Sí
entonces vos por ejemplo puedes crear un
manifiesto que tenga una un template de
tu aplicación y este tipo de template se
le dice deployment el deployment
básicamente es un template para crear
pots una vez que vos aplicas este
template a tu clúster de kubernetes el
controller manager se encarga de crear
esos pods en todo tu clúster bueno esta
fue una explicación muy básica de lo que
es kubernetes y creo que te va a servir
para empezar sí de ahora en adelante
puedes ir a la lista que está acá que es
todos los videos de kubernetes que hice
donde puedes aprender las diferentes eh
features Y cosas que puedas hacer con
kubernetes si viniste acá y queres saber
si tenés que usar kubernetes o no de tu
empresa te recomiendo que veas el video
que nuevamente ya dice acá sobre docker
y docker compost donde hablo de Cuáles
son las diferencias de cada uno y en
cuándo te conviene correr kubernetes en
tu empresa a esta altura hay muchos
proveedores de kubernetes que la verdad
que funcionan muy bien entre ellos
digital Ocean Google Cloud Amazon y
varios más por lo que correr kubernetes
en este momento es bastante fácil
también te voy a dejar un video acá de
Cómo correr kubernetes de forma local
corriendo simplemente una máquina
virtual que ya tiene todos los
componentes de kubernetes para que
puedas practicar y probar esos
manifiestos que te comenté en mi caso
por ejemplo donde yo trabajo tenemos
aproximadamente 3,000 servidores Sí y
corremos unos 100 pots por cada servidor
por lo que imagínate que sería imposible
correr todos esos contenedores a mano o
sea ir a cada uno de sus servidores y
ejecutar un comando para correr un
contenedor por eso necesitamos un
orquestador necesitamos esto para que
pueda mantener todos estos servidores de
una forma más abstracta sí y yo lo único
que hago es decirle a kubernetes creame
esta aplicación y kubernetes se encarga
de moverlo donde tiene que ir así que
bueno eso fue todo por hoy Espero que
hayas aprendido alg uno suscríbete para
más videos Dale gusto si te
[Música]
gustó
anotalo Dale no me gusta Si en lugar de
usar
kubernetes para correr tus contenedores
tus apliaciones en los
pots usas Open
stack con
lxd y te bajas de stack de stack se
llamaba y por más que di ahí bien grande
no correr esto en producción corres un
Script y te instalas de stack en tus
servidores y corres todo ahí y decís a
todo el mundo mira tengo mi propio
Amazon tengo mi propio Amazon
aws yo nunca hice
eso
jamás
Voir Plus de Vidéos Connexes
you need to learn Kubernetes RIGHT NOW!!
Kubernetes Explained in 6 Minutes | k8s Architecture
100+ Docker Concepts you Need to Know
Pods and Containers - Kubernetes Networking | Container Communication inside the Pod
קורס kubernetes (k8s) המלא - שיעור 2 - ארכיטקטורה של אשכול (cluster architecture)
SERVICIOS y LOAD BALANCERS en KUBERNETES
5.0 / 5 (0 votes)