# Kubernates ?
Open-source container orchestration tool. Developed by Google. Kubernetes helps in managing containers.
# Need for a Tool like this
Trend from Monolith to Microservice architecture.
- Monolith = a big, closed application
- Microservices = multiple independand services, that communicate with each other
+ Feature | Explanation |
---|---|
High Availability | Application has no downtime |
Scalability | Users are balanced |
Recovery | Backups & restors |
# Architecture / Cluster
- Control Plane Node - processes to manage the cluster properly
- Process: API-Server - Entrypoint to K8s cluster
- Process: Controller-Manager - whatās happening in cluster?
- Process: Scheduler - ensures Pods placement
- Process: etcd - holds state of K8s cluster = can back up & restore
- Virtual Network
- allows a communication between Master-Node & Worker Nodes
- Worker Node - applications are running
- Kubelet-Process - for communicating with other worker nodes
Kubernetes_Definition 2024-11-29 14.23.34.excalidraw
ā Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ā You can decompress Drawing data with the command palette: āDecompress current Excalidraw fileā. For more info check in plugin settings under āSavingā
Excalidraw Data
Text Elements
Master Node āControl Planeā
virtual/physical machine
Worker Node āNodeā
App1
App2
Kubelet
Worker Node āNodeā
App1
Kubelet
Worker Node āNodeā
App1
App2
Kubelet
API-Server
UI
API
CLI
Controller-Manager
Scheduler
etcd
Virtual Network
Link to original
# Load-difference
Worker Nodes
- higher workload
- much bigger & more resources
Control Plane Nodes
- higher importance = backup
- not big/many resources
# Main Components
Example: Small database-application
# Node
- Server - physical/virtual machine
- consists of pods
# Pod
- the smallest unit in K8s
- managed by Control Plane
- in a pod are containers
- usually 1 container per pod
- each pod - has own IP-address
- Note: Pods die easily - get assigned new IP-address
# Service
- is a permanent IP-address for each Pod
- if a Pod dies - service + IP-address stay
External Service - open service from external sources
- Example: access through internet
- BUT: DataBase should relief as Internal Service
# Ingress
- First step of request - Ingress, then Service
# Other Components
# ConfigMap
# Secret
# Volume
Storage on local machine.
# Demo-Project
mongo-config.yaml:
Secret:
Deployment - MongoDB:
Deployment - WebApp:
Terminal: