Spring Cloud Gateway

Spring Cloud Gateway with Keycloak for Access and Identity Management and Resilience4j for fault tolerance and resiliency, Prometheus and grafana for monitoring, jaeger for distributed tracing on kubernetes
Alternatives To Spring Cloud Gateway
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Netdata62,342
20 hours ago299gpl-3.0C
Real-time performance monitoring, done right! https://www.netdata.cloud
Victoriametrics8,188419 hours ago174September 08, 2022625apache-2.0Go
VictoriaMetrics: fast, cost-effective monitoring solution and time series database
Devops Guide6,318
20 days ago5mitHTML
DevOps Guide - Development to Production all configurations with basic notes to debug efficiently.
Kube Prometheus5,112
a day ago27June 17, 2022175apache-2.0Jsonnet
Use Prometheus to monitor Kubernetes and applications running on Kubernetes
Devops Roadmap4,207
a month ago4apache-2.0
DevOps Roadmap for 2023. with learning resources
K8s_paas3,125
a month ago7mitShell
如何基于K8s(Kubernetes)部署成PaaS/DevOps(一套完整的软件研发和部署平台)--教程/学习(实战代码/欢迎讨论/大量注释/操作配图),你将习得部署如:K8S(Kubernetes)、Dashboard、Harbor、Jenkins、本地Gitlab、Apollo框架、Promtheus、Grafana、Spinnaker等。
K8s Deployment Strategies2,997
6 months ago1Go
Kubernetes deployment strategies explained
Go Zero Looklook2,917
9 days agomitGo
🔥基于go-zero(go zero) 微服务全技术栈开发最佳实践项目。Develop best practice projects based on the full technology stack of go zero (go zero) microservices.
Prometheus Book2,577
a year ago16
Prometheus操作指南
Prometheusalert2,067
15 days ago10April 19, 202127mitJavaScript
Prometheus Alert是开源的运维告警中心消息转发系统,支持主流的监控系统Prometheus,Zabbix,日志系统Graylog和数据可视化系统Grafana发出的预警消息,支持钉钉,微信,华为云短信,腾讯云短信,腾讯云电话,阿里云短信,阿里云电话等
Alternatives To Spring Cloud Gateway
Select To Compare


Alternative Project Comparisons
Readme

Spring Cloud Gateway with Resilience4j and Keycloak Integration

Architecture

This project contains 4 Spring boot Projects and Keycloak for access and identity management

  • Gateway - (This is an API Gateway, where spring cloud gateway is used with Resilience4j and keycloak integration)
  • Micro Service 1 - (This is a reative microservice where Resilience4j patterns are implemented with keycloak integration)
  • Micro Service 2 - (This is a reative microservice)
  • Micro Service 3 - (This is a reative microservice)

Libraries and Tech Stack

GateWay and Microservice Configuration

Please refer Keycloak readme Keycloak configuration

Please refer Gateway readme for Spring Cloud Gateway, Resilience4j and Keycloak configuration

Please refer Micro service 1 readme for Resilience4j and Keycloak configuration

Please refer Grafana how to configure datasources

Please refer Prometheus for prometheus details

Please refer Jaeger for jaeger details

Deployment

We have deployed everything on kubernetes

Steps for Deployment

Creating NameSpace

Execute this file to create namespace

kubectl apply -f namespace.yml

Create redis Instance

Execute this file to create redis instance

kubectl apply -f redis.yml

Create NGINX Ingress Controller

Execute this to deploy NGINX Ingress controller

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/aws/deploy.yaml

Verify pod progress

kubectl get pods -n ingress-nginx -l app.kubernetes.io/name=ingress-nginx --watch

Install Prometheus

Execute this command to deploy prometheus

helm repo add stable https://kubernetes-charts.storage.googleapis.com/
helm repo update

helm install -name prom -n monitor stable/prometheus-operator

Execute this file to setup ingress for Prometheus

kubectl apply -f promingress.yml

Verify pod progress

kubectl get pods -n monitor

Try accessing Prometheus with http://prometheus.practice.com

Install Grafana

Execute this command to deploy Grafana

helm install -name graph -n monitor stable/grafana

Execute this file to setup ingress for Grafana

kubectl apply -f grafanaingress.yml

Try accessing Grafana with http://grafana.practice.com

Install Jaeger

Execute the following command

kubectl create -n monitor -f https://raw.githubusercontent.com/jaegertracing/jaeger-operator/master/deploy/crds/jaegertracing.io_jaegers_crd.yaml
kubectl create -n monitor -f https://raw.githubusercontent.com/jaegertracing/jaeger-operator/master/deploy/service_account.yaml
kubectl create -n monitor -f https://raw.githubusercontent.com/jaegertracing/jaeger-operator/master/deploy/role.yaml
kubectl create -n monitor -f https://raw.githubusercontent.com/jaegertracing/jaeger-operator/master/deploy/role_binding.yaml
kubectl create -n monitor -f https://raw.githubusercontent.com/jaegertracing/jaeger-operator/master/deploy/operator.yaml

Execute this file to deploy jaeger

kubectl apply -f jaeger_new.yml

Execute this file to setup ingress for jaeger

kubectl apply -f jaegeringress.yml

Verify pod progress

kubectl get pods -n monitor

Try accessing jaeger with http://jaeger.practice.com

Create Keycloak Instance

Execute this file to setup keycloak

kubectl apply -f keycloak.yml

Execute this file to setup keycloak Ingress controller

kubectl apply -f keycloakingress.yml

Note :- After Keycload is up and Running create realm and configure client

Create Gateway Instance

Execute this gateway file to create gateway instance

kubectl apply -f gateway.yml

Execute this gateway ingress file to create gateway ingress

kubectl apply -f gatewayingress.yml

Try accessing http://test.practice.com

How Prometheus know where to scrap prometheus end, we need to create service monitor

Execute this gateway service monitor file to create gateway service monitor

kubectl apply -f gatewayservicemonitor.yml

Check the target in Prometheus

Create Microservices instance

Execute this micro service 1 config map file to create config Map for micro service 1, this is used to inject other service URL and Port

We can create config map based on environment and we don't have to change code on different envoronments

kubectl apply -f ms1configmap.yml

Execute this micro service 1 file to create micro service 1 instance

kubectl apply -f ms1.yml

Execute this micro service 2 file to create micro service 2 instance

kubectl apply -f ms2.yml

Execute this micro service 3 file to create micro service 3 instance

kubectl apply -f ms3.yml

Verify pod progress

kubectl get pods -n monitor

Create service Monitor for these services micro service 1, micro service 2 and micro service 3

kubectl apply -f ms1servicemonitor.yml
kubectl apply -f ms2servicemonitor.yml
kubectl apply -f ms3servicemonitor.yml

Verify the Target in Prometheus

Loki

Loki is a log aggregation system inspired by Prometheus.

Excecute this command to install loki

helm repo add loki https://grafana.github.io/loki/charts
helm repo update
helm install loki-stack loki/loki-stack --namespace monitor --set promtail.enabled=true,loki.persistence.enabled=true,loki.persistence.size=1Gi

Pods

Service

Service Monitor

Popular Kubernetes Projects
Popular Grafana Projects
Popular Virtualization Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Java
Kubernetes
Spring Boot
Microservice
Gateway
Prometheus
Grafana
Api Gateway
Kubernetes Deployment
Circuit Breaker