Skip to main content

Create an Ingress for your LangSmith installation (Kubernetes only)

By default, LangSmith will provision a LoadBalancer service for the langsmith-frontend. Depending on your cloud provider, this may result in a public IP address being assigned to the service. If you would like to use a custom domain or have more control over the routing of traffic to your LangSmith installation, you can configure an Ingress.

Requirements

  • An existing Kubernetes cluster
  • An existing Ingress Controller installed in your Kubernetes cluster

Parameters

You may need to provide certain parameters to your LangSmith installation to configure the Ingress. Additionally, we will want to convert the langsmith-frontend service to a ClusterIP service.

  • Hostname (optional): The hostname that you would like to use for your LangSmith installation. E.g "langsmith.example.com". If you leave this empty, the ingress will serve all traffic to the LangSmith installation.

  • Subdomain (optional): If you would like to serve LangSmith on a subdomain, you can specify it here. E.g adding "langsmith" will serve the application at "langsmith.example.com/langsmith".

  • IngressClassName (optional): The name of the Ingress class that you would like to use. If not set, the default Ingress class will be used.

  • Annotations (optional): Additional annotations to add to the Ingress. Certain providers like AWS may use annotations to control things like TLS termination.

    For example, you can add the following annotations using the AWS ALB Ingress Controller to attach an ACM certificate to the Ingress:

    annotations:
    alb.ingress.kubernetes.io/certificate-arn: "<your-certificate-arn>"
  • Labels (optional): Additional labels to add to the Ingress.

  • TLS (optional): If you would like to serve LangSmith over HTTPS, you can add TLS configuration here (many Ingress controllers may have other ways of controlling TLS so this is often not needed). This should be an array of TLS configurations. Each TLS configuration should have the following fields:

    • hosts: An array of hosts that the certificate should be valid for. E.g ["langsmith.example.com"]
    • secretName: The name of the Kubernetes secret that contains the certificate and private key. This secret should have the following keys:
      • tls.crt: The certificate
      • tls.key: The private key
    • You can read more about creating a TLS secret here.

Configuration

With these parameters in hand, you can configure your LangSmith instance to use an Ingress. You can do this by modifying the config.yaml file for your LangSmith Helm Chart installation.


ingress:
enabled: true
hostname: "" # Main domain for LangSmith
subdomain: "" # If you want to serve langsmith on a subdomain
ingressClassName: "" # If not set, the default ingress class will be used
annotations: {} # Add annotations here if needed
labels: {} # Add labels here if needed
tls: [] # Add TLS configuration here if needed

frontend:
service:
type: ClusterIP

Once configured, you will need to update your LangSmith installation. If everything is configured correctly, your LangSmith instance should now be accessible via the Ingress. You can run the following to check the status of your Ingress:

kubectl get ingress

You should see something like this in the output:

NAME                         CLASS   HOSTS    ADDRESS          PORTS     AGE
langsmith-ingress nginx <host> 35.227.243.203 80, 443 95d
Adding the IP address to your DNS provider

If you do not have automated DNS setup, you will need to add the IP address to your DNS provider manually.


Was this page helpful?


You can leave detailed feedback on GitHub.