Closed magnus-larsson closed 3 years ago
In my case, I don't get the default output, so it seems that it isn't working. When there is a service and I run minikube tunnel
again there is an output related to the active service but no the default one described in https://minikube.sigs.k8s.io/docs/handbook/accessing/#using-minikube-tunnel.
β ~ minikube tunnel --alsologtostderr --v=1
W1018 23:25:10.215577 10338 root.go:252] Error reading config file at /home/devniel/.minikube/config/config.json: open /home/devniel/.minikube/config/config.json: no such file or directory
I1018 23:25:10.215723 10338 mustload.go:66] Loading cluster: minikube
I1018 23:25:10.216239 10338 cli_runner.go:110] Run: docker container inspect minikube --format={{.State.Status}}
I1018 23:25:10.246651 10338 host.go:65] Checking if "minikube" exists ...
I1018 23:25:10.246883 10338 cli_runner.go:110] Run: docker container inspect -f "'{{(index (index .NetworkSettings.Ports "8443/tcp") 0).HostPort}}'" minikube
I1018 23:25:10.278286 10338 api_server.go:146] Checking apiserver status ...
I1018 23:25:10.278366 10338 ssh_runner.go:148] Run: sudo pgrep -xnf kube-apiserver.*minikube.*
I1018 23:25:10.278447 10338 cli_runner.go:110] Run: docker container inspect -f "'{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}'" minikube
I1018 23:25:10.311015 10338 sshutil.go:44] new ssh client: &{IP:127.0.0.1 Port:32775 SSHKeyPath:/home/devniel/.minikube/machines/minikube/id_rsa Username:docker}
I1018 23:25:10.417857 10338 ssh_runner.go:148] Run: sudo egrep ^[0-9]+:freezer: /proc/1827/cgroup
I1018 23:25:10.425260 10338 api_server.go:162] apiserver freezer: "7:freezer:/docker/07806c41de29446f7acd8e727f2b92ccee11a851a86a16638ff6bef17a4f84fc/kubepods/burstable/podf7c3d51df5e2ce4e433b64661ac4503c/5f51bb7eafac387a26fe69a5c5462156111b47515e95c48707c9179331ef0e8e"
I1018 23:25:10.425363 10338 ssh_runner.go:148] Run: sudo cat /sys/fs/cgroup/freezer/docker/07806c41de29446f7acd8e727f2b92ccee11a851a86a16638ff6bef17a4f84fc/kubepods/burstable/podf7c3d51df5e2ce4e433b64661ac4503c/5f51bb7eafac387a26fe69a5c5462156111b47515e95c48707c9179331ef0e8e/freezer.state
I1018 23:25:10.431538 10338 api_server.go:184] freezer state: "THAWED"
I1018 23:25:10.431594 10338 api_server.go:221] Checking apiserver healthz at https://127.0.0.1:32772/healthz ...
I1018 23:25:10.436357 10338 api_server.go:241] https://127.0.0.1:32772/healthz returned 200:
ok
I1018 23:25:10.436426 10338 tunnel.go:57] Checking for tunnels to cleanup...
I1018 23:25:10.437283 10338 kapi.go:59] client config for minikube: &rest.Config{Host:"https://127.0.0.1:32772", APIPath:"", ContentConfig:rest.ContentConfig{AcceptContentTypes:"", ContentType:"", GroupVersion:(*schema.GroupVersion)(nil), NegotiatedSerializer:runtime.NegotiatedSerializer(nil)}, Username:"", Password:"", BearerToken:"", BearerTokenFile:"", Impersonate:rest.ImpersonationConfig{UserName:"", Groups:[]string(nil), Extra:map[string][]string(nil)}, AuthProvider:<nil>, AuthConfigPersister:rest.AuthProviderConfigPersister(nil), ExecProvider:<nil>, TLSClientConfig:rest.sanitizedTLSClientConfig{Insecure:false, ServerName:"", CertFile:"/home/devniel/.minikube/profiles/minikube/client.crt", KeyFile:"/home/devniel/.minikube/profiles/minikube/client.key", CAFile:"/home/devniel/.minikube/ca.crt", CertData:[]uint8(nil), KeyData:[]uint8(nil), CAData:[]uint8(nil), NextProtos:[]string(nil)}, UserAgent:"", DisableCompression:false, Transport:http.RoundTripper(nil), WrapTransport:(transport.WrapperFunc)(0x16cdfd0), QPS:0, Burst:0, RateLimiter:flowcontrol.RateLimiter(nil), Timeout:0, Dial:(func(context.Context, string, string) (net.Conn, error))(nil)}
I1018 23:25:10.438374 10338 cli_runner.go:110] Run: docker container inspect -f "'{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}'" minikube
Try set expose port to 8080: kubectl expose deployment balanced --type=LoadBalancer --port=8080 I was learning the k8s and found that if you set a different port from the image(in image k8s.gcr.io/echoserver:1.4, I think the port is 8080), it will keep reseting your connection.
I'm honestly a bit befuddled by this. @medyagh - any clue here?
This seems quite related to #9498 - which leads me to think there may be an issue with tunnel on Docker, rather than specific to WSL2.
I'm going to de-dup this against #9498 for now, as I'm pretty sure the root cause is the same.
Thanks for clarifying this!
I can confirm that following the updated documentation as described in #9498, i.e. change the port from 8000 to 8080, solves the problem!
Summary
The
minikube tunnel
command seems to open the expected port on localhost, but making a request fails withConnection reset by peer
.Environment
Steps to reproduce the issue:
EXTERNAL-IP
=127.0.0.1
)LISTEN
)curl: (56) Recv failure: Connection reset by peer
)Full output of failed command: Output from
curl http://127.0.0.1:8000
:Output from
minikube tunnel
:Full output of
minikube start
command used, if not already included:Optional: Full output of
minikube logs
command: