Skip to main content

Using LoadBalancer Services

How the ngrok Operator Uses LoadBalancer Services

By default, services of type LoadBalancer are exposed using a TCP Endpoint. A reserved address is automatically created for the service and the service's status will be updated with the reserved address. Other projects like external-dns can be used to create a CNAME record for the reserved address automatically.

See the TCP Endpoint and TLS Endpoint pages for more information about how ngrok handles these kinds of endpoints.

For example, the following LoadBalancer service will be provided by a TCP Endpoint.

Loading…

If you would instead like a TLS Endpoint, the following example showcases how you can create one. The k8s.ngrok.com/domain annotation is required to use TLS and will expose the service as a TLS endpoint. Once the reserved domain is ready and the endpoint is created, the service's status will be updated with the ngrok address.

Loading…

While using Services offers simplicity, using the CloudEndpoint and AgentEndpoint resources directly instead of translating LoadBalancer services into them using the operator offers more configuration options and flexibility for configuring TCP and TLS endpoints.