minikube: minikube does not support exposing services to Codespaces

What Happened?

A user on the #minikube Slack channel previously asked for help getting minikube to work on GitHub Codespaces. I have confirmed whether exposed as a nodeport or load balancer with minikube service or minikube tunnel respectively, minikube attempts to expose services using the internal VM network of Codespaces, 193.168.49.2 and not localhost. This is a non-starter for any workflows on Codespaces requiring service access.

Attach the log file

I’ve since moved to using k3d and kind in all my Dev Container and Codespaces workflows, which do expose to 0.0.0.0 and don’t have logs to offer but it should be easy to reproduce: fire up this minimal Dev Container containing minikube, deploy a hello-world service, then attempt to expose with minikube service or minikube tunnel with the appropriate ingress controller deployed if desired.

Operating System

Linux

Driver

Docker

About this issue

Most upvoted comments

I consider k8s vs k3s to be out of scope for this discussion, there are pros and cons and better discussed elsewhere…

I hope that’s not the takeaway from my issue: I value the diversity and health of all these projects. With k3d and kind, both do just work given pure defaults so perhaps their implementation can serve as an example for minikube’s?

Previous attempts to make minikube work better in Lima and in Multipass have not been so successful.

Maybe this one will be better ? Reading https://docs.github.com/en/codespaces/getting-started/deep-dive