Skip to content

Propagate HTTP proxy config into VM #3242

Closed
@cvila84

Description

@cvila84

BUG REPORT

Minikube version (use minikube version): v0.30.0

  • OS (e.g. from /etc/os-release): Windows
  • VM Driver (e.g. cat ~/.minikube/machines/minikube/config.json | grep DriverName): Virtualbox
  • ISO version (e.g. cat ~/.minikube/machines/minikube/config.json | grep -i ISO or minikube ssh cat /etc/VERSION): v0.30.0

What happened:
minikube start --kubernetes-version v1.10.8 --docker-env HTTP_PROXY=xxx --docker-env HTTPS_PROXY=xxx --docker-env NO_PROXY=xxx is failing in timeout during kubeadm command execution

sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests --ignore-preflight-errors=DirAvailable--data-minikube --ignore-preflight-errors=Port-10250 --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-etcd.yaml --ignore-preflight-errors=Swap --ignore-preflight-errors=CRI  &&
sudo /usr/bin/kubeadm alpha phase addon kube-dns

.: Process exited with status 1

What you expected to happen:
minikube starts normally

Anything else do we need to know:
The faulty command is kubeadm alpha phase addon kube-dns. I replayed it inside the minikube VM to have more logs :

$ sudo kubeadm alpha phase addon kube-dns
unable to get URL "https://dl.k8s.io/release/stable-1.10.txt": Get https://dl.k8s.io/release/stable-1.10.txt: dial tcp 23.236.58.218:443: getsockopt: connection timed out

kubeadm is trying to download a file (that actually contains the exact version of kubernetes) but since HTTP proxy settings are not set in VM (they are only set for docker engine through --docker-env parameters), this is failing. I found that if you add --kubernetes-version, no download is done and the command succeeds:

$ sudo kubeadm alpha phase addon kube-dns --kubernetes-version v1.10.8
[addons] Applied essential addon: kube-dns

So a fix could be to propagate the --kubernetes-version passed to minikube start to kubeadm alpha phase addon kube-dns command.

Metadata

Metadata

Assignees

Labels

area/networkingnetworking issuescause/firewall-or-proxyWhen firewalls or proxies seem to be interferinghelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions