Use cases
- Traffic Policy configuration: Store API keys, tokens, and credentials that you can use to authenticate visitors with traffic policy actions
- Multi-environment management: Sync different secrets to different ngrok vaults for dev, staging, and production
- Secret rotation: Automatically propagate rotated secrets from Kubernetes to ngrok
- Compliance: Use sensitive configuration data in traffic policies securely, without leaking them
How it works
External Secrets Operator watches forPushSecret resources in your cluster.
When a PushSecret is created or updated, it reads the specified Kubernetes secret and pushes the secret data to your ngrok vault using the ngrok API.
The secret then becomes available in ngrok for use in Traffic Policies.
The operator continues to sync changes based on the configured refresh interval, ensuring your ngrok secrets stay up-to-date.
Limitations
- Currently supports push operations only (Kubernetes → ngrok)
- Pull operations (ngrok → Kubernetes) are not yet supported
What you’ll need
- An ngrok account with API access
- An ngrok API key
- An ngrok vault created for storing secrets
- External Secrets Operator installed in your Kubernetes cluster
Configuration
1. Create ngrok API credentials
First, store your ngrok API key in a Kubernetes secret:2. Configure SecretStore
Next, create a SecretStore that connects to ngrok’s API:auth.apiKey: Reference to your ngrok API key (required)vault.name: Name of your ngrok vault where secrets will be stored (required)apiURL: API endpoint (optional, defaults tohttps://api.ngrok.com)
Pushing secrets to ngrok
Basic push configuration
To sync a Kubernetes secret with ngrok, create a PushSecret resource:Adding metadata to secrets
You can enhance your ngrok secrets with descriptions and custom metadata:What’s next?
- Learn how to use secrets in Traffic Policies to reference your synced secrets dynamically in policy actions.
- Explore the Traffic Policy Actions available to secure and manage traffic to your endpoints.
- Learn more about the ngrok Kubernetes Operator and how to configure Traffic Policies directly in your Kubernetes deployments.