Multipass VM not reachable via specific http ports from host

Viewed 1615

I'm running an Ubuntu VM with multipass hyperkit do run microk8s. Within the VM all things checkout and available with skaffold/kubectl port forwarding. For instance:

$ multipass list
Name                    State             IPv4             Image
microk8s-vm             Running           192.168.64.2     Ubuntu 20.04 LTS
                                          10.0.1.1
                                          172.17.0.1
                                          10.1.254.64

Port forwarding service/my-app in namespace default, remote port 80 -> 127.0.0.1:4503

Within the VM:curl localhost:4503 ✅

From the host: curl 192.168.64.2:4503

I know the VM is reachable on port 80 because curl 192.168.64.2 returns default ngnix not found page. FWIW I never installed ngnix and the service doesn't seem to be running /cannot turn it off.

I've been at this for a day and I'm stumped. I even tried the Vbox driver and manually configured a bridge adapter. I even created my own adapter...

$ multipass exec -- microk8s-vm sudo bash -c "cat > /etc/netplan/60-bridge.yaml" <<EOF
network:
  ethernets:
    enp0s8:                  # this is the interface name from above
      dhcp4: true
      dhcp4-overrides:       # this is needed so the default gateway
        route-metric: 200    # remains with the first interface
  version: 2
EOF
$ multipass exec microk8s-vm sudo netplan apply

How can I reach this VM from the host?

0 Answers
Related