This guide describes 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 described in the following table:

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 is 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 is available at Observability.
/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, such 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 are two ways to access the actuator endpoint:

  • Accessing directly using the port-forward utility in the Pod
  • Exposing a Service that tracks all Gateway instances

Accessing directly by Gateway Pod

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

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

Indicate the following 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

Indicate the following into the configuration:

  • spec.selector: labels selector you can use to track your Gateway instances. VMware recommends using gateway-name and gateway-type=spring-cloud-gateway because both 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. VMware recommends taking this into account when exposing the endpoint in any way.

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