# K3sServiceEndpointResource

- Module: [CommunityToolkit.Aspire.Hosting.K3s](/reference/api/typescript/communitytoolkit.aspire.hosting.k3s.md)
- Version: `13.5.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/tree/4ff8268fbd97ddd23cb73dc8eff9cc92718156d1)

Represents a Kubernetes Service exposed from a k3s cluster as an Aspire endpoint resource.

## Definition

```typescript
interface K3sServiceEndpointResource
  extends IExpressionValue,
    IManifestExpressionProvider,
    IResource,
    IResourceWithConnectionString,
    IResourceWithParent,
    K3sClusterResource]],
    IResourceWithWaitSupport,
    IValueProvider,
    IValueWithReferences {
  readonly connectionStringEnvironmentVariable: string;
  readonly connectionStringExpression: ReferenceExpression;
  hostPort: number;
  readonly namespace: string;
  readonly parent: K3sClusterResource;
  readonly serviceName: string;
  readonly servicePort: number;
}
```

## Properties

- `connectionStringEnvironmentVariable`: `string` `get` -- The environment variable name used to inject the service URL into dependents (`services__{name}__url`), following the Aspire service-discovery convention.
- `connectionStringExpression`: `ReferenceExpression` `get` -- Gets the manifest expression for the service URL. Resolves to `http(s)://localhost:{hostPort}` when the endpoint is ready.
- `hostPort`: `number` `get - set` -- Gets the host port bound by the port-forward listener.
- `namespace`: `string` `get` -- Gets the Kubernetes namespace that contains the Service.
- `parent`: [K3sClusterResource](/reference/api/typescript/communitytoolkit.aspire.hosting.k3s/k3sclusterresource.md) `get` -- Gets the Parent property
- `serviceName`: `string` `get` -- Gets the name of the Kubernetes Service being forwarded.
- `servicePort`: `number` `get` -- Gets the port number declared on the Kubernetes Service.
