Error while adding kubernetes key
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
gpg: no valid OpenPGP data found.
I tried using wget
verbose command
wget --no-check-certificate -vO - https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
--2018-10-05 09:55:13-- https://packages.cloud.google.com/apt/doc/apt-key.gpg
Resolving packages.cloud.google.com (packages.cloud.google.com)... failed: Temporary failure in name resolution.
wget: unable to resolve host address ‘packages.cloud.google.com’
gpg: no valid OpenPGP data found.
How can I get past that error in my Kubernetes installation step?
Check first if you should be using a proxy to access external URLs (you would then have to declare that proxy in a .wgetrc
)
But see also if using curl -4 -s...
(forcing IPV4 instead of a possible default IPV6) would work better, as described in "Ubuntu 16.04: curl, wget, ssh could not resolve host from dnsmasq with IPv6".
Thank you all.
Not sure what is the exact issue but below below solution helped me resolve this issue
cat /etc/resolv.conf # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
as this file was lacking nameservers. Adding nameservers resolved the issue