This guide exposes all the information available through the actuator endpoint.

Gateway Actuator Endpoint

Spring Cloud Gateway for Kubernetes instances expose several Spring Boot actuator management endpoints on port 8090. These can be used to get information and observe the internal state of the Gateway application.

The available endpoints are:

Endpoint Description
/actuator Displays a full list of the available actuator endpoints for the Gateway instance.
/actuator/info Displays the version and other Gateway instance build information, TLS certificates and API-Key information are also available here.
/actuator/health Displays the Gateway instance health indicator status (`UP` or `DOWN`). More info are available at Health Check endpoint configuration section.
/actuator/metrics Displays a full list of available metrics on the Gateway instance, accessing each of the metrics will be displayed different data about them. More info are available at Observability section.
/actuator/gateway/routes Retrieves the list of all API routes currently available on the Gateway instance. Filters applied to each route are displayed, as well as other info as their predicate, metadata and order.
/actuator/gateway/globalfilters Retrieves the list of global filters activated on the Gateway instance and their order of execution.
/actuator/gateway/routefilters Retrieves the full list of route filters available on the Gateway instance.

Exposing the actuator endpoint

There're two ways of access the actuator endpoint: accessing directly using the port-forward utility in the Pod or exposing a Service that tracks all Gateway instances.

Accessing directly by Gateway Pod

Using port-forwarding utility in each gateway pod you can listen on a local port to access the available endpoints:

kubectl port-forward gateway-pod-name 7000:8090

You need to indicate as parameters:

  • Pod gateway name, in the example gateway-pod-name.
  • Local port to listen, in the example 7000.
  • Port to forward from the pod, in the example 8090 which is the default actuator port.

Exposing a Service

You can create a Kubernetes Service to expose the actuator endpoints:

apiVersion: v1
kind: Service
metadata:
  name: my-service
spec:
  selector:
    gateway.name=my-gateway
    gateway.type=spring-cloud-gateway
  ports:
    - protocol: TCP
      port: 7000
      targetPort: 8090

You need to indicate into the configuration:

  • spec.selector: labels selector you can track your Gateway instances. We recommend to use gateway-name and gateway-type=spring-cloud-gateway as are always present in each Gateway instance.
  • ports.port: local port to listen, in the example 7000.
  • ports.targetPort: port to forward from the pod, in the example 8090 which is the default actuator port.

Important Some of the actuator endpoints provide information that from a security point of view can be considered sensitive information about the Gateway, we recommend take this into account when exposing the endpoint in any way.

check-circle-line exclamation-circle-line close-line
Scroll to top icon