When we run our applications in docker container and if the container fails, we need to manually start the container
If the node i.e. the machine fails all the containers running on the machine should be re-created on other machine
K8s can do both of the above
Autoscaling
Containers don’t scale on their own.
Scaling is of two types
Vertical Scaling
Horizontal Scaling
K8s can do both horizontal and vertical scaling of containers
Zero-Down time Deployments
K8s can handle deployments with near zero-down time deployments
K8s can handle rollout (new version) and roll back (undo new version => previous version)
K8s is described as Production grade Container management
History
Google had a history of running everything on containers.
To manage these containers, Google has developed container management tools (inhouse)
Borg
Omega
With Docker publicizing containers, With the experience in running and managing containers, Google has started a project Kubernetes (developed in Go) and then handed it over to Cloud Native Container Foundation (CNCF)
Competetiors
Apache Mesos
Hashicorp Nomad
Docker Swarm
But K8s is clear winner
Terms
Distributed System
Node
Cluster
State
Stateful Applications
Stateless Applications
Monolith
Microservices
Desired State
Declarative vs Imperative
Pet Vs Cattle
K8s is not designed only for Docker
Initially k8s used docker as a main container platform and docker used to get special treatment, from k8s 1.24 special treatment is stopped.
k8s is designed to run any container technology, for this k8s expects container technology to follow k8s interfaces.