We will take our pets application, which we first introduced in Chapter 8, Docker Compose, and deploy it into a Kubernetes cluster. Our cluster will be Minikube, which, as you know, is a single-node cluster. But, from the perspective of a deployment, it doesn't really matter how big the cluster is and where the cluster is located—in the cloud, in your company's data center, or on your personal workstation.
Just as a reminder, our application consists of two application services, the Node.js-based web component and the backing PostgreSQL database. In the previous chapter, we learned that we need to define a Kubernetes Deployment
object for each application service we want to deploy. Let's do this first for the web component. As always in this book, we will choose the declarative way of defining our objects. Here is the YAML defining a Deployment
object for the web component:
Kubernetes deployment definition for the web component
The preceding...