Skip to main content
KubeAI is used for deploying LLMs with an OpenAI compatible endpoint. Admins can configure ML models via kind: Model Kubernetes Custom Resources. KubeAI can be thought of as a Model Operator that manages vLLM and Ollama servers. In this tutorial you will learn how to deploy KubeAI and Langtrace end-to-end. Both KubeAI and Langtrace are installed in your Kubernetes cluster. No cloud services or external dependencies are required.
  1. If you don’t have a K8s cluster yet, you can create one using kind or minikube.
  1. Install Langtrace:
  1. Install KubeAI:
  1. Create a local Python environment and install dependencies:
  1. Expose the KubeAI service to your local port:
  1. Expose the Langtrace service to your local port:
  1. A Langtrace API key is required to use the Langtrace SDK. So lets get one by visiting your self hosted Langtace UI. Open your browser to http://localhost:3000, create a project and get the API keys for your langtrace project. In the Python script below, replace langtrace_api_key with your API key.
  2. Create file named langtrace-example.py with the following content:
  1. Run the Python script:
  1. Now you should see the trace in your Langtrace UI. Take a look by visiting http://localhost:3000.
traces