Skip to main content

Private links

Reference for lk agent private-link, which connects deployed agents to private services in your AWS or Azure network.

Overview

Use lk agent private-link to connect deployed agents to private services in your AWS or Azure network. For setup, see Private Links. To install the CLI, see Install the CLI.

Create a private link

Create a private link to an endpoint service in your cloud account.

lk agent private-link create [options]

Options for private-link create:

  • --name NAME: Name for the private link. Required.
  • --region REGION: LiveKit agent region for the link, not the cloud provider region. If unset, the CLI prompts you.
  • --cloud-region REGION: Cloud provider region of the resource. Required when --endpoint is an Azure Resource ID. Otherwise, it's derived from the endpoint.
  • --port PORT: TCP port your endpoint service listens on. Required.
  • --endpoint ENDPOINT: AWS endpoint service name, Azure Private Link Service alias, or Azure Resource ID. Required.

The command returns the private link ID and prints the generated *.link hostname as Gateway DNS.

Examples

Create a link on AWS:

lk --project production agent private-link create \
--name customer-redis \
--region us-east \
--port 6379 \
--endpoint 'com.amazonaws.vpce.us-east-1.vpce-svc-0123456789abcdef0'

Create a link on Azure:

lk --project production agent private-link create \
--name customer-redis \
--region us-east \
--cloud-region eastus \
--port 10000 \
--endpoint '<AZURE_RESOURCE_ID>'

Check private link status

Show a private link's status and health. See status values.

lk agent private-link health-status [options]

Options for private-link health-status:

  • --id ID: Private link ID. Required.

Examples

lk --project production agent private-link health-status --id CAPL_MyLinkId

List private links

List all private links in the current project.

lk agent private-link list

Examples

lk --project production agent private-link list

Delete a private link

Delete a private link. Wait for the endpoint connection to disappear from your cloud console before deleting the provider-side resources.

lk agent private-link delete [options]

Options for private-link delete:

  • --id ID: Private link ID. Required.

Examples

lk --project production agent private-link delete --id CAPL_MyLinkId