An RSVP app designed to be deployed by the dockers on the Kubernetes Minikube Cluster. Front end with flask framework and MongoDB as a backend database.
Youtube video:https://youtu.be/KnjnQj-FvfQ
2. Background
"Google's Borg system is a cluster manager that runs hundreds of thousands
of jobs, from many thousands of different applications, across a number of
clusters each with up to tens of thousands of machines."
- Abstarct of Google’s Borg Paper
3. What is Kubernetes?
•The name kubernetes originated from Greek, which means “helmsman” or “Pilot.”
•It is also known as K8s where K is the first character and last 8 letters are replaced by substring
“ubernete”.
● Kubernetes are originally developed by Google in 2014 and now, it is a part of the Cloud Native
Computing Foundation project. It is written in go language.
● It is used to group multiple containers into one unit in order to facilitate management and
deployment of multiple containers.
4. Container Orchestration
First, what is container?
- One kind of way to deliver and package multiple applications with High-performing , scalable
applications on any kind of infrastructure.
5. Need to deploy containers over cluster for large scalable applications. At production stage of the
application, we need to ensure that our application should run as per following:
- Fault-tolerant
- On-demand scalability
- Optimal resource use
- Inter-application communication
- Accessibility from external environment
- Fast update/rollback
Container Orchestration is used to meet all above requirements
6. Container Orchestrators
Kubernetes, Docker Swarm, Amazon ECS, etc...
What can a container orchestrator do?
- Bind hosts to a cluster
- Assign and schedule containers to run on
hosts
- Help communication between containers
running on different hosts
- Bind similar container to manage them as
services
- Keep track of usage and storage
- Enable secure access to apps in containers
Ref : https://coderise.io/wp-content/uploads/2018/01/orchestration-1073x550.png
7. Docker proved to be all of the
following:
● Faster
● Reliable
● Efficient
● Light-weight
● Scalable
But...Docker
Swarm was not
easily Scalable..
8. It was not
scalable
because….
● Container could not
communicate with each
other
● Container had to be
deployed appropriately
● Containers had to be
managed carefully
● Auto scaling was not
possible
● Distributing traffic was
still challenging
9. How does Kubernetes Work
https://upload.wikimedia.org/wikipedia/commons/thumb/b/be/Kubernetes.png/600px-
10. Master: Controls the cluster and
nodes in it.
Nodes: Hold the containers inside
them; containers are inside separate
PODS.
PODS : are logical collection of
containers which need to interact
with each other for an application
Ref : https://d1jnx9ba8s6j9r.cloudfront.net/blog/wp-content/uploads/2018/05/kubernetes-architecture-
768x345.png
Wait, What are the basic components?
12. Reference: https://www.edureka.co/blog/kubernetes-vs-docker/
One can set desired
cluster using two
methods:
1. Command Line
Interface(CLI)
-It uses kubectl to
serve the purpose.
2. Kubernetes API.
-It uses API
directly to
communicate with
the cluster and set
or change desired
cluster sets.
13. All right. What is Master Node then?
- API server
- Controller Manager
- Scheduler
- etcd
14. API Server: is management and communication center for master node and its object such as
pods, services, volumes and others. The server takes REST commands from user/operator, then
executes requests
Controller Manager : manages and attempting to change the current state of the cluster to the
desired state
Scheduler : schedules work mainly for worker nodes. The scheduler has information of workers’
resource usage and constraints. It schedules the work in terms of Pod and Service
etcd : is an operator consists of key value for storing cluster states and mainly manages to
maintain healthy state of the cluster
15. What about Worker Node?
- Container runtime
Executes & manages container
images
- Kubelet
Communicates with Master
Node, run containers
- Kube-proxy
It runs on each node and
provides networking services on
each node.
16. Kubernetes Objects
• Unit of deployment, group of containers
deployed on the same hostPod
• Logical interface of service/microserviceService
• Preserves container dataVolume
• Virtual clusterNamespace
19. Kubernetes VS Docker Swarm
Similarities
- Open source projects
- Various storage options
- Load balancing and DNS
- Monitoring
- Support high availability
20. Differences
Scalability:
- Kubernetes
Provides strong cluster state health guarantee
Slower scaling & deployment rate
- Docker Swarm
Deploy container faster compared to Kubernetes
Fast on-demand scaling for smaller cluster
21. Application Definition:
- Kubernetes
Application deployed as pods + deployment + services
Deployment replicated in multiple nodes
- Docker Swarm
Application deployed as services (microservices)
Auto-scaling:
- Kubernetes: available
- Docker Swarm: Not directly available
22. Overall...
Kubernetes:
- Higher complexity, flexible but complex installation, stable support for high demand and large
scale application
Docker Swarm:
- Simple solution for smaller scale application, quick setup
23. Features of Kubernetes
Automatic
binpacking
Self- Healing
Horizontal
scaling
Service
discovery and
Load Balancing
Automatic
rollouts and
rollbacks
Secrets and
configuration
management
Storage
orchestration
Batch
execution
24. Advantages of Kubernetes
Deals with
large data
volume
Auto-scaling
Analyzes server
load to scale
up/down
Logging and
monitoring
Quickly analyze
logs to debug
failures
Monitoring keeps
Master constantly
aware of Worker
Nodes health
Provides GUI
25. Limitations of Kubernetes
•Management tools need to be
installed separately
Complex
installation and
setup procedures
•Newly created process takes
time to initialize before
becoming available to user
Long process
initialization &
slower container
management
26. Demo
● Please follow the link mentioned here to understand working of Kubernetes.
https://www.dropbox.com/s/h67wxttmcb83kd6/final-demo-2018-11-20_01.06.20.mp4?raw=1
27. References
[1]"Compare Kubernetes vs Docker Swarm", Platform9, 2018. [Online]. Available:
https://platform9.com/blog/kubernetes-docker-swarm-compared/. [Accessed: 31- Oct- 2018].
[2]"Production-Grade Container Orchestration", Kubernetes.io, 2018. [Online]. Available: https://kubernetes.io.
[Accessed: 31- Oct- 2018].
[3]S. Ravindra, M. Fredrickson and S. Dyer, "Kubernetes vs. Docker Swarm: What’s the Difference?", The New
Stack, 2018. [Online]. Available: https://thenewstack.io/kubernetes-vs-docker-swarm-whats-the-difference/.
[Accessed: 31- Oct- 2018].
[4]"Understanding the Kubernetes Architecture with a Use-Case", Edureka Blog, 2018. [Online]. Available:
https://www.edureka.co/blog/kubernetes-architecture/. [Accessed: 31- Oct- 2018].