addServiceEndpoint
Method
interface K3sClusterResource { // ... omitted for brevity addServiceEndpoint( name: string, serviceName: string, servicePort: number, namespace?: string, scheme?: string): K3sServiceEndpointResource;}Signature
method
addServiceEndpoint builderExposes a Kubernetes Service from the cluster as an Aspire endpoint resource.
addServiceEndpoint( name: string, serviceName: string, servicePort: number, namespace?: string, scheme?: string): K3sServiceEndpointResourceParameters
namestringThe Aspire resource name for this endpoint.serviceName stringThe name of the Kubernetes Service to forward, as it appears in `kubectl get svc`.servicePort numberThe port number declared on the Kubernetes Service (the `port` field, not `targetPort`). Must be in the range 1–65535.namespacestringoptional= defaultThe Kubernetes namespace that contains the Service. Defaults to `default`.schemestringoptionalThe URL scheme (`http` or `https`) for the injected environment variable. When `null` (the default), the scheme is inferred from the port: ports 443 and 8443 use `https`, all others use `http`.Returns
K3sServiceEndpointResource Applies to
This method applies to the following types: