{"id":19331349,"url":"https://github.com/andriykalashnykov/spring-microservices-k8s","last_synced_at":"2025-04-10T01:09:44.970Z","repository":{"id":38396913,"uuid":"249475867","full_name":"AndriyKalashnykov/spring-microservices-k8s","owner":"AndriyKalashnykov","description":"Java Microservices with Spring Boot and Spring Cloud Kubernetes","archived":false,"fork":false,"pushed_at":"2024-09-17T00:02:37.000Z","size":101,"stargazers_count":125,"open_issues_count":2,"forks_count":78,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-10T01:09:40.080Z","etag":null,"topics":["configmap","containerization","dockerfile","healthchecks","java","k8s","kubernetes","microservice","netflix-ribbon","secret","service-discovery","spring-boot","spring-cloud-kubernetes","swagger","swagger-ui"],"latest_commit_sha":null,"homepage":"https://tanzu.vmware.com/developer/guides/kubernetes/app-enhancements-spring-k8s/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndriyKalashnykov.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-23T15:54:56.000Z","updated_at":"2025-03-14T23:09:16.000Z","dependencies_parsed_at":"2024-09-17T04:34:41.455Z","dependency_job_id":null,"html_url":"https://github.com/AndriyKalashnykov/spring-microservices-k8s","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndriyKalashnykov%2Fspring-microservices-k8s","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndriyKalashnykov%2Fspring-microservices-k8s/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndriyKalashnykov%2Fspring-microservices-k8s/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndriyKalashnykov%2Fspring-microservices-k8s/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndriyKalashnykov","download_url":"https://codeload.github.com/AndriyKalashnykov/spring-microservices-k8s/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137886,"owners_count":21053775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["configmap","containerization","dockerfile","healthchecks","java","k8s","kubernetes","microservice","netflix-ribbon","secret","service-discovery","spring-boot","spring-cloud-kubernetes","swagger","swagger-ui"],"created_at":"2024-11-10T02:39:46.222Z","updated_at":"2025-04-10T01:09:44.947Z","avatar_url":"https://github.com/AndriyKalashnykov.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GitHub CI Status](https://github.com/AndriyKalashnykov/spring-microservices-k8s/workflows/ci/badge.svg)](https://github.com/AndriyKalashnykov/spring-microservices-k8s/actions?query=workflow%3Aci)\n[![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FAndriyKalashnykov%2Fspring-microservices-k8s\u0026count_bg=%2379C83D\u0026title_bg=%23555555\u0026icon=\u0026icon_color=%23E7E7E7\u0026title=hits\u0026edge_flat=false)](https://hits.seeyoufarm.com)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n### Java Microservices with Spring Boot and Spring Cloud Kubernetes\n\nThis is repository accompanies my article for the `Tanzu Development Center` - [Microservices with Spring Cloud Kubernetes Reference Architecture](https://tanzu.vmware.com/developer/guides/app-enhancements-spring-k8s//)\n\nThis Reference Architecture demonstrates design, development, and deployment of\n[Spring Boot](https://spring.io/projects/spring-boot) microservices on\nKubernetes. Each section covers architectural recommendations and configuration\nfor each concern when applicable.\n\nHigh-level key recommendations:\n\n- Consider Best Practices in Cloud Native Applications and [The 12\n  Factor App](https://12factor.net/)\n- Keep each microservice in a separate [Maven](https://maven.apache.org/) or\n  [Gradle](https://docs.gradle.org/current/userguide/userguide.html) project\n- Prefer using dependencies when inheriting from parent project instead of using\n  relative path\n- Use [Spring Initializr](https://start.spring.io/) a web application that can\n  generate a Spring Boot project structure, fill in your project details, pick\n  your options, and download a bundled up project\n\nThis architecture demonstrates a complex Cloud Native application that\naddresses following concerns:\n\n- Externalized configuration using ConfigMaps, Secrets, and PropertySource\n- Kubernetes API server access using ServiceAccounts, Roles, and RoleBindings\n- Health checks using Application Probes\n  - readinessProbe\n  - livenessProbe\n  - startupProbe\n- Reporting application state using Spring Boot Actuators\n- Service discovery across namespaces using DiscoveryClient\n- Exposing API documentation using Swagger UI\n- Building a Docker image using best practices\n- Layering JARs using the Spring Boot plugin\n- Observing the application using Prometheus exporters\n### Pre-requisites\n\n- OS: Mac or Linux\n- [Docker](https://docs.docker.com/install/)\n- [Minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/)\n- [Virtualbox](https://www.virtualbox.org/manual/ch02.html)\n- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)\n- [sdkman](https://sdkman.io/install)\n\n    JDK 11.x\n    \n    ```shell\n    sdk install java 11.0.14-tem\n    sdk use java 11.0.14-tem\n\n    ```\n- [Apache Maven](https://maven.apache.org/install.html)\n- [Curl](https://help.ubidots.com/en/articles/2165289-learn-how-to-install-run-curl-on-windows-macosx-linux)\n- [HTTPie](https://httpie.org/doc#installation)\n- [tree](http://mama.indstate.edu/users/ice/tree/)\n\n### Clone repository\n\n```bash\ngit clone git@github.com:AndriyKalashnykov/spring-microservices-k8s.git\n```\n\n### Start Kubernetes cluster\n\n```bash\ncd ./spring-microservices-k8s/scripts/\n./start-cluster.sh\n```\n\n### Configure Kubernetes cluster\n\n```bash\ncd ./spring-microservices-k8s/scripts/\n./setup-cluster.sh\n```\n\n### Deploy application to Kubernetes cluster\n\n```bash\ncd ./spring-microservices-k8s/scripts/\n./install-all.sh\n```\n\n### Polulate test data\n\n```bash\ncd ./spring-microservices-k8s/scripts/\n./populate-data.sh\n```\n\n### Observe Employee service logs\n\n```bash\ncd ./spring-microservices-k8s/scripts/\n./employee-log.sh\n```\n\n### Open Swagger UI web interface\n\n```bash\ncd ./spring-microservices-k8s/scripts/\n./gateway-open.sh\n```\n\n### Undeploy application from Kubernetes cluster\n\n```bash\ncd ./spring-microservices-k8s/scripts/\n./delete-all.sh\n```\n\n### Delete Application specific Kubernetes cluster configuration (namespaces, clusterRole, etc.)\n\n```bash\ncd ./spring-microservices-k8s/scripts/\n./destroy-cluster.sh\n```\n\n### Stop Kubernetes cluster\n\n```bash\ncd ./spring-microservices-k8s/scripts/\n./stop-cluster.sh\n```\n\n\n## Stargazers over time\n\n[![Stargazers over time](https://starchart.cc/AndriyKalashnykov/spring-microservices-k8s.svg)](https://starchart.cc/AndriyKalashnykov/spring-microservices-k8s)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandriykalashnykov%2Fspring-microservices-k8s","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandriykalashnykov%2Fspring-microservices-k8s","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandriykalashnykov%2Fspring-microservices-k8s/lists"}