Skip to main content
Version: 1.51

Custom Endpoints

The Okteto UI shows the endpoints of the Ingress, HTTPRoute, and VirtualService resources deployed in your Namespaces. Okteto supports two annotations on these resources, including your own HTTPRoutes, to customize the endpoints it shows.

Hiding Endpoints​

To hide the endpoints of a resource from the Okteto UI, add the dev.okteto.com/hide-from-ui: "true" annotation.

Replacing Endpoints​

To replace the default endpoints of a resource, use the dev.okteto.com/endpoints annotation. It accepts a comma-separated list of endpoints and expands the OKTETO_NAMESPACE and OKTETO_DOMAIN variables, so your endpoints stay portable between Namespaces.

apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: movies
annotations:
dev.okteto.com/endpoints: https://movies-${OKTETO_NAMESPACE}.${OKTETO_DOMAIN}/api
spec:
rules:
- matches:
- path:
type: PathPrefix
value: /api
backendRefs:
- name: api
port: 8080
- backendRefs:
- name: frontend
port: 80