Containerizing and deploying a Spring Boot application using Cloud Code
Let's try to containerize and deploy the Spring Boot application we created in the previous section. To containerize our Spring Boot application, we will use jib-maven-plugin
. We've used this many times in previous chapters, so I will skip the setup for it here. We will deploy to a local Minikube cluster using kubectl
. Let's learn how to do this:
- First, we will need a
skaffold.yaml
file in the root directory of our project. - You can create an empty file named
skaffold.yaml
and use the Cloud Code auto-completion feature, as shown in the following screenshot, to generate a workingskaffold.yaml
file: - Sometimes, a new schema version may be available. Cloud Code is smart enough to detect those changes and will suggest that you upgrade the schema as well, as shown in the following screenshot: