This is a boilerplate template for building / deploying a Spring microservice on Kubernetes using Skaffold + Dekorate.
GitHub Release | JDK Version | Spring Boot Version | Spring Cloud Version | Skaffold Version | Dekorate Version | Jib Version |
---|---|---|---|---|---|---|
master | 15 | 2.3.4.RELEASE | Hoxton.RELEASE | 1 | 0.13.2 | 2.6.0 |
├── README.md
├── manifests
├── mvnw
├── mvnw.cmd
├── pom.xml
├── skaffold.yaml
├── src
│ ├── main
│ │ ├── java
│ │ │ └── guru
│ │ └── resources
│ │ ├── application-kubernetes.yaml
│ │ ├── bootstrap.yaml
│ │ ├── static
│ │ └── templates
│ └── test
│ └── java
│ └── guru
└── target
manifests
folder will contain Kubernetes manifests generated by Dekorateskaffold.yml
is the Kubernetes pipelinesrc/main/java
folder will contain Spring Java classessrc/main/resources
folder will contain Spring bootstrap (bootstrap.yaml) config and Dekorate config (application-kubernetes.yaml)target
folder will contain Spring JAR file
To setup this project, you need to clone the git repo
$ git clone https://github.com/kubeopsskills/spring-starter-skaffold-dekorate.git
$ cd spring-starter-skaffold-dekorate
followed by
$ mvn clean install
Preparing RBAC for Spring microservice
$ git clone https://github.com/kubeopsskills/spring-starter-skaffold-dekorate-config.git
$ cd spring-starter-skaffold-dekorate-config
followed by
$ kubectl apply -f rbac
Preparing Config Map for Spring microservice
$ kubectl apply -k config
To enable Continuous Development (Develop + Integrate Source Code From IDE) on Kubernetes, run following command:
$ skaffold dev -p dev -n [namespace]
This will build the project source code to Docker image and then deploying it on Kubernetes with forwarding logs from Kubernetes to your IDE!