'Commands from Minikube "Get Started" tutorials not working as expected
OS: Windows 10 Pro (Build: 19043.1706)
Docker Desktop 4.8.2 (79419) running on Windows WSL 2
WSL Distribution: Ubuntu-20.04 (Default)
Minikube version: v1.25.2
I am beginning to learn Kubernetes and as such started off with the "Get Started" tutorials found on their official website, the links are given below:
minikube start
Hello Minikube
The first problem was encountered when I followed along the instructions given in the first tutorial given above and executed the below command:
minikube dashboard
Essentially, after a rather long wait period, I got a timeout error with an error messages that read something along the lines of the following:
X Exiting due to SVC_URL_TIMEOUT: http:///api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/ is not accessible: checkURL: Get "http:///api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/": http: no Host in request URL
Thereafter, I went back to reading the second tutorial and there I realized that I should've executed the command 'minikube dashboard' from a different terminal. This time it worked out and the dashboard page opened in my browser.
The next problem was encountered when executing the below command:
minikube service hello-minikube
It did open the browser, but the webpage timed out and nothing was displayed on the browser. However, when I tried the alternative given below:
kubectl port-forward service/hello-minikube 7080:8080
I was able to view the webpage at the location 'http://localhost:7080/' on my browser. I left the first tutorial at that point.
The same thing happened even in the second tutorial. I followed along and successfully continued on to create a deployment and a service, until I had to execute the following:
minikube service hello-node
The same thing happened and the browser wasn't able to display the webpage.
Following is the output when I execute "kubectl get po -A":
PS C:\WINDOWS\system32> kubectl get po -A
NAMESPACE NAME READY STATUS RESTARTS AGE
default hello-minikube-7bc9d7884c-nbvhk 1/1 Running 0 81m
default hello-node-6b89d599b9-hmppf 1/1 Running 0 36m
kube-system coredns-64897985d-tckpm 1/1 Running 0 4h26m
kube-system etcd-minikube 1/1 Running 0 4h26m
kube-system kube-apiserver-minikube 1/1 Running 0 4h26m
kube-system kube-controller-manager-minikube 1/1 Running 0 4h26m
kube-system kube-proxy-n7psv 1/1 Running 0 4h26m
kube-system kube-scheduler-minikube 1/1 Running 0 4h26m
kube-system storage-provisioner 1/1 Running 1 (4h26m ago) 4h26m
kubernetes-dashboard dashboard-metrics-scraper-58549894f-n2l52 1/1 Running 0 4h20m
kubernetes-dashboard kubernetes-dashboard-ccd587f44-vzrlp 1/1 Running 0 4h20m
Why am I encountering this problem when executing the commands of the form "minikube service [service-name]"? Any kind of assistance would be highly appreciated.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
