Skip to content

QAdottech/k8-ngrok-setup-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example k8 setup for enabling access to QA.tech

Setup

Install minicube

This is only needed for local testing of this setup, otherwie you'll use your real kubernetes cluster.

https://minikube.sigs.k8s.io/docs/start/?

To install the latest minikube stable release on ARM64 macOS using binary download:

curl -LO https://github.com/kubernetes/minikube/releases/latest/download/minikube-darwin-arm64
sudo install minikube-darwin-arm64 /usr/local/bin/minikube

And start the service

minikube start

Build and run the cluster

SKIP THIS IF YOU ALREADY HAVE A CLUSTER*

eval $(minikube docker-env)
docker build -t example-webapp ./example-webapp

And apply the k8 config:

kubectl apply -f deployment.yaml
kubectl apply -f service.yaml

Then get the URL:

minikube service example-service

This should expose a URL on a random Port, and when accessed it should respond with;

Hello from inside the kubernetes cluster!

Add Ngrok

This can be done in this example cluster, or in your own k8 cluster!

First, sign up at https://ngrok.com, then get your authtoken.

Then create a k8 secret

kubectl create secret generic ngrok-secret \
 --from-literal=authtoken=<YOUR_NGROK_AUTHTOKEN>

And apply the ngrok configuration:

kubectl apply -f ngrok-deployment.yaml

Then go to: https://dashboard.ngrok.com/endpoints

And you'll find the publicly accessible URL to get inside the cluster

When you go to that url, which should be like https://c19c-94-254-106-50.ngrok-free.app it should display:

Hello from inside the kubernetes cluster!

Point your QA.tech account to this url to test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published