{"id":24308920,"url":"https://github.com/akaspatranobis/spring-app-microservices-kubernetes","last_synced_at":"2026-04-11T01:10:42.313Z","repository":{"id":270486981,"uuid":"910526269","full_name":"akaspatranobis/spring-app-microservices-kubernetes","owner":"akaspatranobis","description":"Sample Spring Boot application that uses some features provided by Spring Cloud Kubernetes, Spring Cloud OpenFeign and Spring Cloud Gateway deployed on Kubernetes","archived":false,"fork":false,"pushed_at":"2025-01-08T11:57:24.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-17T05:11:59.286Z","etag":null,"topics":["configmaps","docker","gateway","kubernetes","microservices","ribbon","skaffold","spring-boot","spring-cloud-kubernetes","swagger2","zuul"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akaspatranobis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-12-31T14:25:04.000Z","updated_at":"2025-01-08T12:00:23.000Z","dependencies_parsed_at":"2025-01-17T05:12:00.166Z","dependency_job_id":null,"html_url":"https://github.com/akaspatranobis/spring-app-microservices-kubernetes","commit_stats":null,"previous_names":["akaspatranobis/spring-app-microservices-kubernetes"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akaspatranobis%2Fspring-app-microservices-kubernetes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akaspatranobis%2Fspring-app-microservices-kubernetes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akaspatranobis%2Fspring-app-microservices-kubernetes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akaspatranobis%2Fspring-app-microservices-kubernetes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akaspatranobis","download_url":"https://codeload.github.com/akaspatranobis/spring-app-microservices-kubernetes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242277694,"owners_count":20101545,"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":["configmaps","docker","gateway","kubernetes","microservices","ribbon","skaffold","spring-boot","spring-cloud-kubernetes","swagger2","zuul"],"created_at":"2025-01-17T05:11:55.620Z","updated_at":"2026-04-11T01:10:42.272Z","avatar_url":"https://github.com/akaspatranobis.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Microservices with Spring Boot and Spring Cloud on Kubernetes Demo Project \n\n[![CircleCI](https://circleci.com/gh/piomin/sample-spring-microservices-kubernetes.svg?style=svg)](https://circleci.com/gh/piomin/sample-spring-microservices-kubernetes)\n\n[![SonarCloud](https://sonarcloud.io/images/project_badges/sonarcloud-black.svg)](https://sonarcloud.io/dashboard?id=piomin_spring-microservices-kubernetes)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=piomin_spring-microservices-kubernetes\u0026metric=bugs)](https://sonarcloud.io/dashboard?id=piomin_spring-microservices-kubernetes)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=piomin_spring-microservices-kubernetes\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=piomin_spring-microservices-kubernetes)\n[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=piomin_spring-microservices-kubernetes\u0026metric=ncloc)](https://sonarcloud.io/dashboard?id=piomin_spring-microservices-kubernetes)\n\nIn this project I'm demonstrating you the most interesting features of [Spring Cloud Project](https://spring.io/projects/spring-cloud) for building microservice-based architecture that is deployed on Kubernetes. All the samples may be easily deployed on local Kubernetes single-node cluster - Minikube.\n\n\n## Getting Started \n\n### Usage\n1. Download and run **Minikube** using command: `minikube start --vm-driver=virtualbox --memory='4000mb'` \n2. Build Maven project with using command: `mvn clean install`\n3. Build Docker images for each module using command, for example: `docker build -t piomin/employee:1.1 .`\n4. Go to `/kubernetes` directory in repository\n5. Apply all templates to Minikube using command: `kubectl apply -f \u003cfilename\u003e.yaml`\n6. Check status with `kubectl get pods`\n\n## Architecture\n\nOur sample microservices-based system consists of the following modules:\n- **gateway-service** - a module that Spring Cloud Netflix Zuul for running Spring Boot application that acts as a proxy/gateway in our architecture.\n- **employee-service** - a module containing the first of our sample microservices that allows to perform CRUD operation on Mongo repository of employees\n- **department-service** - a module containing the second of our sample microservices that allows to perform CRUD operation on Mongo repository of departments. It communicates with employee-service. \n- **organization-service** - a module containing the third of our sample microservices that allows to perform CRUD operation on Mongo repository of organizations. It communicates with both employee-service and department-service.\n- **admin-service** - a module containing embedded Spring Boot Admin Server used for monitoring Spring Boot microservices running on Kubernetes\nThe following picture illustrates the architecture described above including Kubernetes objects.\n\n\u003cimg src=\"https://piotrminkowski.files.wordpress.com/2018/07/micro-kube-1.png\" title=\"Architecture1\"\u003e\n\nYou can distribute applications across multiple namespaces and use Spring Cloud Kubernetes `DiscoveryClient` and `Ribbon` for inter-service communication.\n\n\u003cimg src=\"https://piotrminkowski.files.wordpress.com/2019/12/microservices-with-spring-cloud-kubernetes-discovery.png\" title=\"Architecture2\" \u003e\n\n## Before you start\nGo to the `k8s` directory. You will find there several YAML scripts you need to apply before running applications.\n1. `privileges.yaml` - `Role` and `RoleBinding` for Spring Cloud Kubernetes to allow access Kubernetes API from pod\n2. `mongo-secret.yaml` - credentials for MongoDB\n3. `mongo-configmap.yaml` - user for MongoDB\n4. `mongo-deployment.yaml` - `Deployment` for MongoDB\nJust apply those scripts using `kubectl apply`.\n\nYou can easily deploy all applications using `skaffold dev` command.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakaspatranobis%2Fspring-app-microservices-kubernetes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakaspatranobis%2Fspring-app-microservices-kubernetes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakaspatranobis%2Fspring-app-microservices-kubernetes/lists"}