[Roadmap] Backend Developer Roadmap: 13. Docker and Kubernetes
Backend Roadmap | Link |
---|---|
0. Roadmap | Roadmap |
1. Internet | Internet |
2. OS | Operating System |
3. R-DB | Relational Database |
4. API | API |
5. Caching | Caching |
6. Security | Web Security |
7. Testing | Testing |
8. CI/CD | CI/CD |
9. Design | Design and Development Principles |
10. Architecture | Architectural Patterns |
11. Search Engines | Search Engines |
12. OAuth | OAuth |
13. Docker/K8s | Docker and Kubernetes |
Docker
1. What is Docker?
Docker
is a conatiner technology: A tool for creating and managing containers
Container
- A standardized unit of software
- A package of code and dependencies to run that code (e.g. NodeJS code + the NodeJS runtime)
- The same container always yields the exact same application and execution behavior. No matter where or by whom it might be executed.
- Support for Containers is build into modern operating systems.
- Docker simplifies the creation and management of such containers
2. Why Containers?
We want reliability and reproducible environments
- We want to have the exact same environment for development and production -> this ensures that is works exactly as tested
- It should be easy to share a common development environment or setup with (new) employees and colleagues
- We don’t want to uninstall and re-install local dependencies and runtimes all the time
3. Virtual Machines vs Docker Containers
Docker Containers | Virtual Machines | |
---|---|---|
Low impac on OS, very fast, minimal disk space usage | Bigger impact on OS, slower, higher disk spaces uage | |
Sharing, re-building and distribution is easy | Sharing, re-building and distribution can be challenging | |
Encapsulate apps/ environments instead of “whole machines” | Encapsulate “whole machines” instead of just apps/ environments |
Kubernetes
1. Problem and Solve(AWS ECS)
Manual deployment of Containers is hard to maintain, error-prone and annoying (ene beyond security and configuration concerns)
- Containers might crash or go down and need to be replaced -> Container health checks + automatic re-deployment
- We might need more container instances upon traffic spikes -> Autoscaling
- Incoming traffic should be distributed equally -> Load balancer
2. Further Problem
Using a specific cloud service locks us into that service.
You need to learn about the specifics, services and config options of another provider if you want to switch.
Just knowing Docker isn’t enough.
3. Kubernetes
Kubernetes
: An open-source system (and de-facto standard) for orchestrating container deployments
- Automatic Deployment
- Scaling & Load Balancing
- Management
4. Why Kubernetes?
-
Using with Any Cloud Provider or Remote Machines (Kubernetes Configuration)
-
Extensible, yet standardized configuration: Standardized way of describing the to-be-created and to-be-managed resources of the Kubernetes Cluster (Cloud-provider-specific settings can be added)
5. What Kubernetes IS and IS NOT
- It’s not a cloud service provider -> It’s an open-source project
- It’s not a service by a cloud service provider -> It can be used with any provider
- It’s not restricted to any specific (cloud) service provider -> It can be used with any provider
- It’s not just a software you run on some machine -> It’s a collection of concepts and tools
- It’s not an alternative to Docker -> It works with (Docker) containers
- It’s not a paid service -> It’s a free open-source project
Therefore, Kubernetes is like Docker-Compose for multiple machines
댓글남기기