Once you have created a few Docker containers, you'll realize that something is missing. If you want to run multiple containers across multiple machines – which you'll need to do if you're using microservices—there is still a lot of work to do.
You need to start the right containers at the right time, figure out how they can talk to each other, handle storage considerations, and deal with failed containers or hardware. Doing all of this manually would be a nightmare. Luckily, that's where K8s comes in.
K8sis an open source container-orchestration platform, allowing large numbers of containers to work together in harmony, reducing the operational burden. It helps with things such as:
- Running containers across many different machines.
- Scaling up or down by adding or removing containers when demand changes.
- Keeping storage consistent with multiple instances of an application.
- Distributing load between the containers.
- Launching new containers on different machines if something fails...