Access Minikube with ngrok

Cluster information:

Kubernetes version: 1.22.2
Cloud being used: bare-metal
Installation method: curl -LO “$(curl -L -s”
Host OS: Linux, Ubuntu 18.04.5
CNI and version: not enabled
CRI and version: not enabled

Hi all, I’m trying to access an instance of minikube using ngrok that’s using this Docker image. It’s running on a remote server that I access from an additional remote server, so we’re using ngrok to simplify things.

The Dockerfile I used to create the image is

ARG BASE_CONTAINER=jupyter/tensorflow-notebook:lab-3.1.12

LABEL maintainer="Texas State EECS Group"

# # Install C++ Kernel and fix permissions
RUN conda install --quiet --yes \
       xeus-cling -c conda-forge \
       && \
       conda clean --all -f -y && \
       fix-permissions "${CONDA_DIR}" && \ 
       fix-permissions "/home/${NB_USER}"

# Install JupyterLab extension
WORKDIR /home/jovyan
RUN pip install -i jlab-ext-example==0.1.5


The commands I’m using to run minikube are:

minikube start
kubectl create deployment gc-test4 --image=codestar12/greenhub_user:latest
kubectl expose deployment gc-test4 --type=NodePort --port=8080
minikube --namespace default service gc-test4 --url

The last command outputs a url something like, which I then use to run ngrok in another terminal with ngrok http etc. When I click the link ngrok gives me, I get

GET /                          502 Bad Gateway                                         
GET /favicon.ico               502 Bad Gateway                                         
GET /                          502 Bad Gateway

in the ngrok console and an error page that looks like this in the browser:

Any ideas on why this is happening are are much appreciated!