Containerizing and deploying to Kubernetes
When we introduced Docker in Chapter 5, Deployment Patterns and Tools, we showed how you can use it to encapsulate your code and then run it across many different platforms consistently.
Here we will do this again, but with the idea in mind that we don’t just want to run the application as a singleton on a different piece of infrastructure, we actually want to allow for many different replicas of the microservice to be running simultaneously with requests being routed effectively by a load balancer. This means that we can take what works and make it work at almost arbitrarily large scales.
We will do this by executing several steps:
- Containerize the application using Docker.
- Push this Docker container to Docker Hub to act as our container storage location (you could use another container management solution like AWS Elastic Container Registry or similar solutions on another cloud provider for this step). ...