Networking

Endpoint

Endpoint — cluster-adaptive routing for a service.

Component:Endpoint

Examples

01

Example 1

import { Endpoint } from '@r8s/recipes'

export default <Endpoint name="api" host="api.example.com" serviceName="api" />
02

Example 2

import { Platform, Endpoint } from '@r8s/recipes'
import { operators } from '@r8s/crds'

export default (
  <Platform operators={[operators['cert-manager']('1.18.0')]}>
    <Endpoint name="api" host="api.example.com" serviceName="api" />
  </Platform>
)

Props

hoststringRequired

Hostname for the endpoint (required)

serviceNamestringRequired

Service name to route to

servicePortnumberOptional

Service port (default: 80)

pathstringOptional

Request path to route (default: '/'). Path-based routes are rendered as Prefix paths in Ingress mode AND PathPrefix matches in Gateway (HTTPRoute) mode so one host can serve multiple services.

pathType'Prefix' | 'Exact' | 'ImplementationSpecific'Optional

Ingress pathType when path is set (default: 'Prefix')

dnsbooleanOptional

Create a DNS record via ExternalDNS (default: false, or true when DnsProvider is set)

dnsTtlnumberOptional

DNS record TTL in seconds (default: 300)

sharedGateway{ name: string, namespace?: string }Optional

Reference to an existing shared Gateway instead of creating a new one. Set this to avoid allocating a new LoadBalancer IP per app. When set, only an HTTPRoute is created (no Gateway resource).