Skip to content

Instantly share code, notes, and snippets.

@chukaofili
Last active May 2, 2022 15:23
Show Gist options
  • Save chukaofili/9e73954e2838a89471c80a608100a8f0 to your computer and use it in GitHub Desktop.
Save chukaofili/9e73954e2838a89471c80a608100a8f0 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: ConfigMap
metadata:
name: ngrok-configmap
namespace: default
data:
ngrok.yml: |
authtoken: [AUTH_TOKEN HERE]
console_ui: true
web_addr: "0.0.0.0:4040"
log_level: info
log_format: term
log: stdout
region: us
tunnels:
nginx-ingress-wildcard:
proto: http
addr: nginx-ingress-controller:80
hostname: "*.example.dev"
bind_tls: false
nginx-ingress-wildcard-tls:
proto: tls
addr: nginx-ingress-controller:443
hostname: "*.example.dev"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: ngrok
namespace: default
spec:
selector:
matchLabels:
app: ngrok
replicas: 1
template:
metadata:
labels:
app: ngrok
spec:
restartPolicy: Always
containers:
- name: ngrok
image: wernight/ngrok
command: ["ngrok"]
args: ["start", "--all"]
ports:
- containerPort: 4040
volumeMounts:
- name: config-volume
mountPath: /home/ngrok/.ngrok2/
volumes:
- name: config-volume
configMap:
name: ngrok-configmap
---
apiVersion: v1
kind: Service
metadata:
name: ngrok-service
namespace: default
spec:
type: NodePort
ports:
- name: http
port: 4040
targetPort: 4040
protocol: TCP
selector:
app: ngrok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment