spring-petclinic icon indicating copy to clipboard operation
spring-petclinic copied to clipboard

Add deployment for spring boot in k8s

Open shivampateriya1 opened this issue 2 years ago • 3 comments

I want to contribute in the spring-pet clinic by adding k8s deployment file and SQL file in k8s.

shivampateriya1 avatar May 15 '22 10:05 shivampateriya1

We've talked about it before but never really had a consensus on what should go into the manifest. There are lots of choices and not many are obviously right. If you had a suggestion you could send a PR and we could go over it again.

dsyer avatar Aug 22 '22 11:08 dsyer

I want to contribute in the spring-pet clinic by adding k8s deployment file and SQL file in k8s.

I just want to mention: https://github.com/spring-petclinic/spring-petclinic-cloud (official fork)

xerx593 avatar May 09 '23 18:05 xerx593

That would be a useful reference for anyone wanting to contribute. Also see here for some working example code: https://github.com/dsyer/spring-petclinic/tree/k8s.

I would say we need as few lines of YAML as we can get away with using just vanilla kubectl and Spring Boot features.

  1. Use the image generated by mvn spring-boot:build-image and deploy either in a local repository or a public one (like dockerhub)
  2. minimal service and deployment
  3. just one database (probably mysql) and a config map following the Service Binding spec because Spring Boot will pick that up automatically
  4. maybe /livez and /readyz (can be exposed through a system property or application property)

dsyer avatar Jan 30 '24 09:01 dsyer