Questions tagged spring-cloud-gateway

Explore the latest questions and answers asked by our top developers.

Kubernetes: spring cloud gateway not working

I have a spring cloud gateway that works fine in the docker configuration, like this: (all routes/services except ratings are removed for readability’s sake) @Value("${hosts.ratings}") private String ratingsPath; @Bean public RouteLocator customRouteLocator(RouteLocatorBuilder builder) { return builder.routes() .route(r -> r.host("*").and().path("/api/ratings/**") .uri(ratingsPath + ":2226/api/ratings/")) …other routes… .build(); } This gets it values from the application.properties locally, and […]

How to dockerize spring cloud gateway and eureka server and link with keycloak?

I am new with docker. how to dockerize spring cloud gateway (is its image available in docker hub or not),eureka server and link with keycloak? I am getting problem in this. Source: Docker Questions

Unable to establish connection between dockers over https

So what I am trying to do is having two docker with https connections and call one docker from another using spring APIGateway Here is my application.properties in the first docker : lets say this is my apigateway spring.cloud.gateway.routes[0].id = consumer spring.cloud.gateway.routes[0].uri =https://consumer-service:8081 spring.cloud.gateway.routes[0].predicates[0]=Path=/consumer server.ssl.key-alias=selfsigned_localhost_sslserver server.ssl.key-password=password server.ssl.key-store=classpath:ssl-server.jks server.ssl.key-store-provider=SUN server.ssl.key-store-type=JKS Then this is the application.properties in […]

Spring Cloud Gateway in Docker – configuring routes with application.yaml

I am using Spring Cloud Gateway for routing traffic to different microservices. For this purpose, during development, I defined routes in application.yaml file. The target runtime for SCG is Docker and Kubernetes, so I am looking for a solution to pass routing configuration during container start-up. I have a couple of ideas but non are […]

Optimize JVM memory for springcloud gateway and kubernetes

I am facing the problem of optimizing the JVM for Kubernetes. I deployed springcloud gateway on Kubernetes and I search to optimize the memory used in the Pods. First question, the memory used in pods is more than 300Mi. I find this important for an application like the gateway. Second question, I added this section […]

Spring Cloud Gateway not Working on Docker

I have configured a spring cloud gateway to redirect to a server a created with the following route: @Bean public RouteLocator myRoutes(RouteLocatorBuilder builder) { return builder.routes() .route(p -> p .path("/v1/**") .uri("lb://data-diff-service")) .build(); } It works fine on a local environment, but when I start my services containers through my docker-compose file, the gateway is not […]

How to reuse Spring Cloud Gateway Docker image for multiple/different projects?

I have a Spring Cloud project with Gateway, Config, discovery and more than 20 microservices. Whole project is Dockerized. Most of these microservices are reusable and we can use them as a docker image referenced from docker-compose.yml file in another projects. I want to make Spring Cloud Gateway reusable too. The problem here is that […]

Oauth2 doesn’t show login page with Spring Gateway usng Docker Compose

I’m dealing with a problem using Oauth2 with Srping Gateway and Eureka by Docker compose. When I run the Oauth2 service locally, it works OK. I use Postman to get the acces token: So when I click on the Get new Access Token button, Postman shows the login view: But running the service connected with […]

Spring-cloud-gateway Docker-compose

My goal is to implement Spring-cloud-Gateway as a reverse proxy which I plan to eventually utilize as a reverse proxy in tandem with Keycloak for microservice security. The issue I am currently having is as follows: Run a microservice in docker without Spring-cloud-gateway Run Spring-cloud-gateway with default settings and a single route to redirect to […]

By George Colon
Published
Categorised as docker, docker-compose, dockerfile, spring, spring-cloud-gateway

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq