In Minikube Buildroot OS wget: not an http or ftp url

12/31/2019

I have Setup minikube in my Machine using Hyper-v in windows 10. All working fine, but when i tried to setup fannel network i execute following commannd.

wget http://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml

Oupput:-

Connecting to raw.githubusercontent.com (151.101.192.133:80)
wget: not an http or ftp url: https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml

I tried some solution like to install wget and hash -r but not working. Any idea or suggestion to solve this.

Thank you,

-- Vinit Patel
kubernetes
minikube

1 Answer

12/31/2019

Note that the actual url your wget is trying to connect to is not an http but https url and the output you attached says:

wget: not an http or ftp url

which is true as https is neither http nor ftp url. It looks like your wget version supports only two mentioned protocols.

You can easily check it by issuing following commands:

wget -V | grep https

and

wget -V | grep ssl

I tried to reproduce it on a system possibly similar to the one you're using. For this purpose I created a buildroot Pod from advancedclimatesystems/docker-buildroot image:

kubectl run --generator=run-pod/v1 buildroot --image=advancedclimatesystems/docker-buildroot --command sleep 3600

and I attached to it by:

kubectl exec -ti buildroot /bin/sh

Once there, I tested out your wget command and it was successful. It's output in my system looks like this (note the 301 redirection to https url):

root@buildroot:~/buildroot# wget http://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
--2019-12-31 16:04:27--  http://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.0.133, 151.101.64.133, 151.101.128.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.0.133|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml [following]
--2019-12-31 16:04:27--  https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.0.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14416 (14K) [text/plain]
Saving to: 'kube-flannel.yml'

kube-flannel.yml                                     100%[=====================================================================================================================>]  14.08K  --.-KB/s    in 0s      

2019-12-31 16:04:27 (53.3 MB/s) - 'kube-flannel.yml' saved [14416/14416]

As you can see it has built-in ssl and https support:

root@buildroot:~/buildroot# wget -V | grep ssl  
+ntlm +opie +psl +ssl/openssl 
    -Wl,-z,relro -Wl,-z,now -lpcre -luuid -lidn2 -lssl -lcrypto -lpsl 
    ftp-opie.o openssl.o http-ntlm.o ../lib/libgnu.a

root@buildroot:~/buildroot# wget -V | grep https
-cares +digest -gpgme +https +ipv6 +iri +large-file -metalink +nls
-- mario
Source: StackOverflow