What you’ll need
- One or more Linux hosts that meet Rancher’s requirements for operating as Kubernetes nodes. These can be on-prem or cloud virtual machines or bare-metal servers.
- An ngrok account.
kubectland Helm 3.0.0+ installed on your local workstation.- The ngrok Kubernetes Operator installed on your cluster. You can install it through Rancher, but this guide recommends the official Helm chart.
- A reserved domain from the ngrok dashboard or API; this guide refers to it as
NGROK_DOMAIN.
Set up your Rancher cluster
This guide assumes an RKE2 cluster managed by Rancher and reachable withkubectl.
Disable Rancher’s built-in NGINX ingress when you create the cluster, since ngrok provides ingress.
If you don’t have this yet:
- Install the Rancher management server. Rancher’s single-node Docker install is a quick option for test and demonstration environments.
- Create an RKE2 cluster and register your Linux nodes, following Rancher’s guide for launching Kubernetes on existing nodes.
- Set up
kubectlwith the cluster’s kubeconfig, which you can copy from the Rancher dashboard.
Install a sample application
With the ngrok Kubernetes Operator running on your cluster, add a sample application. The Operator connects this application to ngrok, which routes external traffic to it through your Rancher-managed cluster.-
Create a new Kubernetes manifest (
tinyllama.yaml) with the contents below, replacingNGROK_DOMAINwith the domain you reserved. This manifest defines the tinyllama demo LLM application service and deployment, then adds an Ingress that tells the ngrok Kubernetes Operator to route traffic arriving onNGROK_DOMAINto thetinyllamaservice.showLineNumbers -
Apply the
tinyllama.yamlmanifest to your RKE2 cluster. -
Access your tinyllama demo app by navigating to your ngrok domain (for example,
https://NGROK_DOMAIN). ngrok’s network and the Operator route traffic to your app from any device or external network.