Variations
In this lesson, we'll look at some variations in Kubernetes.
We'll cover the following
Kubernetes offers a runtime environment for Docker containers and is very flexible.
MOMs in Kubernetes #
The example in this chapter uses communication with REST. Of course, it is also possible to operate a MOM like Kafka (chapter 7) in Kubernetes.
However, MOMs store transmitted messages to guarantee delivery. Kafka even saves the complete history. Reliable storage of data in a Kubernetes cluster is feasible, but not easy. Using a MOM other than Kafka does not solve the problem.
All MOMs store messages permanently to guarantee delivery. For reliable communication with a MOM, Kubernetes has to store the data reliably and scalably.
Frontend integration with Kubernetes #
Kubernetes can be quite easily combined with frontend integration (chapter 3), since Kubernetes does not make any assumptions about the UI of the applications.
Client-side frontend integration does not place any demands on the backend. For server-side integration, a cache or web server must be hosted in a Docker container.
However, these servers do not store any data permanently, so they can easily be operated in Kubernetes.
Docker Swarm and Docker Compose #
Kubernetes offers a very powerful solution and is further developed by many companies in the container area.
However, Kubernetes is also very complex due to its many features.
A cluster with Docker Compose and Docker Swarm can be a simpler but less powerful alternative. However, Docker Swarm and Compose also offer basic features like service discovery and load balancing.
Docker vs. virtualization #
As Kubernetes takes over cluster management, it includes features that virtualization solutions also offer.
This can also lead to operational concerns, as reliable cluster operation is a challenge. Another technology in this area is often viewed critically. When deciding against Kubernetes, Docker can still be used without a scheduler.
But then the Kubernetes features for service discovery, load balancing, and routing are missing. They probably have to be implemented by different means.
Get hands-on with 1400+ tech skills courses.