kubernetes/minikube

Minikube for Mac ignores `--https` flag in `minikube service` command

Aperta

#12.714 aperta il 15 ott 2021

 (12 commenti) (0 reazioni) (0 assegnatari)Go (5222 fork)batch import
co/servicehelp wantedkind/buglifecycle/staleos/macospriority/backlog

Metriche repository

Star
 (31.799 stelle)
Metriche merge PR
 (Merge medio 12g 19h) (43 PR mergiate in 30 g)

Descrizione

MInikube service command ignores --https flag and exposes urls only via http.

Configuration details:

  • minikube v1.23.2 on Darwin 11.6
  • Client Version: version.Info{Major:"1", Minor:"18+", GitVersion:"v1.18.18-dispatcher", GitCommit:"de944d802c49735ad0f4bfe82ddfa19737ebe962", GitTreeState:"clean", BuildDate:"2021-05-13T17:54:06Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.2", GitCommit:"8b5a19147530eaac9476b0ab82980b4088bbc1b2", GitTreeState:"clean", BuildDate:"2021-09-15T21:32:41Z", GoVersion:"go1.16.8", Compiler:"gc", Platform:"linux/amd64"}

Steps to reproduce the issue:

  1. minikube delete
  2. minikube config set vm-driver docker
  3. minikube start
  4. kubectl apply -f test/phpmyadmin.yaml -f test/services/phpmyadmin.yaml
  5. kubectl get pods -A
NAMESPACE     NAME                                READY   STATUS    RESTARTS      AGE
default       phpmyadmin-6b87d5bc8f-tkn7k        1/1     Running   0             9s
kube-system   coredns-78fcd69978-6h55m           1/1     Running   0             62m
kube-system   etcd-minikube                      1/1     Running   0             63m
kube-system   kube-apiserver-minikube            1/1     Running   0             63m
kube-system   kube-controller-manager-minikube   1/1     Running   0             63m
kube-system   kube-proxy-gl9qj                   1/1     Running   0             62m
kube-system   kube-scheduler-minikube            1/1     Running   0             63m
kube-system   storage-provisioner                1/1     Running   1 (62m ago)   63m
  1. minikube service list
|-------------|------------------------------|----------------|-----|
|  NAMESPACE  |             NAME             |  TARGET PORT   | URL |
|-------------|------------------------------|----------------|-----|
| default     | kubernetes                   | No node port   |
| default     | phpmyadmin-node-port-service | http-port/80   |     |
|             |                              | https-port/443 |     |
| kube-system | kube-dns                     | No node port   |
|-------------|------------------------------|----------------|-----|
  1. minikube service phpmyadmin-node-port-service --url
* Starting tunnel for service phpmyadmin-node-port-service.
|-----------|------------------------------|-------------|------------------------|
| NAMESPACE |             NAME             | TARGET PORT |          URL           |
|-----------|------------------------------|-------------|------------------------|
| default   | phpmyadmin-node-port-service |             | http://127.0.0.1:55484 |
|           |                              |             | http://127.0.0.1:55485 |
|-----------|------------------------------|-------------|------------------------|
http://127.0.0.1:55484
http://127.0.0.1:55485
! Because you are using a Docker driver on darwin, the terminal needs to be open to run it.
  1. minikube service phpmyadmin-node-port-service --url --https
* Starting tunnel for service phpmyadmin-node-port-service.
|-----------|------------------------------|-------------|------------------------|
| NAMESPACE |             NAME             | TARGET PORT |          URL           |
|-----------|------------------------------|-------------|------------------------|
| default   | phpmyadmin-node-port-service |             | http://127.0.0.1:55532 |
|           |                              |             | http://127.0.0.1:55533 |
|-----------|------------------------------|-------------|------------------------|
http://127.0.0.1:55532
http://127.0.0.1:55533
! Because you are using a Docker driver on darwin, the terminal needs to be open to run it.

Also I've payed attention that this issue has been reproducing on Mac only. I've tested on Ubuntu and --https flag works as expected.

Guida contributor