Quickstart: Kubernetes Operator
This quickstart will use the ngrok Kubernetes Operator to put an application running on a Kubernetes Cluster on the internet and add some basic policies.
What is the ngrok Kubernetes Operator?
The ngrok Kubernetes Operator is the best way to use ngrok if your applications run as services in a Kubernetes cluster. Key benefits of the operator include:
- Easy Installation: The Operator can be easily installed on a cluster via Helm and is compatible with the latest versions of Kubernetes.
- Broad Support: The Operator supports both Ingress CRDs and the new Gateway API using the same installation.
- Developer Self-Service: Once deployed, the Operator enables developers to self-service public endpoints for their apps and services using a shared ngrok account.
- Resource Management: The Operator manages the creation of ngrok resources, allowing developers to focus on traffic and routing patterns.
- Advanced Configuration: The Operator supports the configuration of resources like custom domains, modules, and policies.
- Cloud Benefits: The Operator supports all the cloud benefits of ngrok, including our global points of presence, GSLB, and traffic inspector.
Step 1: Install Kubernetes Operator
Installing the ngrok Kubernetes Operator is easy using Helm.
- Kubernetes Operator
- Gateway API
Add the ngrok Kubernetes Operator repo to Helm:
Loading…
Install the ngrok Kubernetes Operator:
Loading…
Add the ngrok Kubernetes Operator repo to Helm:
Loading…
Add the latest Gateway API CRDs to your cluster:
Loading…
Install the ngrok Kubernetes Operator:
Loading…
Install the GatewayClass object:
Loading…
Step 2: Connect Your Service To An Edge
This would create an Edge on with the Domain example.ngrok.app
that routes traffic to the Kubernetes service example-service
running on port 80
.
- Kubernetes Operator
- Gateway API
Loading…
Loading…
Step 3: Route Traffic Based On A Path
This would create an Edge on with the Domain example.ngrok.app
that routes traffic from example.ngrok.app/foo
to the Kubernetes service example-service
running on port 80
.
- Kubernetes Operator
- Gateway API
Loading…
Loading…
Step 4: Modify Headers For Incoming Requests
- Kubernetes Operator
- Gateway API
Loading…
Loading…
Step 5: Redirect Traffic
- Kubernetes Operator
- Gateway API
Redirects are not yet supported with the ngrok Kubernetes Operator.
Loading…
Next Steps
- Star the ngrok Kubernetes Operator GitHub repo and follow it for updates.
- Browse our examples of HTTP Endpoints to see other ways ngrok can augment your application.
- Bring your own custom domain to ngrok