Closed
Description
BUG REPORT
Environment:
Minikube version (use minikube version
): v0.28.2
- OS (e.g. from /etc/os-release): OSX
What happened:
- Created a Service
kubectl run echoserver --image=gcr.io/google_containers/echoserver:1.4 --port=8080
kubectl expose deployment echoserver --type=NodePort
- Used
minikube service --format ...
to generate a few variations of a formatted string
$ minikube service echoserver --format "{{.IP}}:{{.Port}}" --url
Error opening service: Check that minikube is running and that you have specified the correct namespace: parse 192.168.99.100:30563: first path segment in URL cannot contain colon
$ minikube service echoserver --format "http{{.IP}}:{{.Port}}" --url --https
https192.168.99.100:30563
$ minikube service echoserver --format "http.myservice:{{.Port}}" --url --https
https.myservice:30563
- an error when the formatted string is not a URL
- https is erroneously substituted when the prefix
http
was not part of the URL scheme
What you expected to happen:
- formatted string can take any form I please
- https should only be substituted when the URL scheme is http
$ minikube service echoserver --format "{{.IP}}:{{.Port}}" --url
192.168.99.100:30563
$ minikube service echoserver --format "http{{.IP}}:{{.Port}}" --url --https
http192.168.99.100:30563
$ minikube service echoserver --format "http.myservice:{{.Port}}" --url --https
http.myservice:30563
How to reproduce it (as minimally and precisely as possible):
See Above :)