红联Linux门户
Linux帮助

Kubernetes安装时gpg: no valid OpenPGP data found.的解决办法

发布时间:2016-11-01 11:13:23来源:linux网站作者:wiborgite
官方给出的安装命令是apt-get install -y docker.io kubelet kubeadm kubectl kubernetes-cni 其中-y表示对于需要确认之处取值为y,需要确认的地方其中就有是否需要验证证书的,这里可以手工确认,貌似是可以下载到证书的。安装如下(其中没有docker,因为之前已安装)
 
root@ubuntu:/home/wht/Kubernetes# apt-get install  kubelet kubeadm kubectl 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
kubernetes-cni socat
The following NEW packages will be installed:
kubeadm kubectl kubelet kubernetes-cni socat
0 upgraded, 5 newly installed, 0 to remove and 60 not upgraded.
Need to get 321 kB/41.2 MB of archives.
After this operation, 329 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
WARNING: The following packages cannot be authenticated!
kubernetes-cni kubelet kubectl kubeadm
Install these packages without verification? [y/N] y  //取N时,因为有服务端的强制验证,因此会报错
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 socat amd64 1.7.3.1-1 [321 kB]
Fetched 316 kB in 4s (67.6 kB/s)                        
Selecting previously unselected package kubernetes-cni.
(Reading database ... 58697 files and directories currently installed.)
Preparing to unpack .../kubernetes-cni_0.3.0.1-07a8a2-00_amd64.deb ...
Unpacking kubernetes-cni (0.3.0.1-07a8a2-00) ...
Selecting previously unselected package socat.
Preparing to unpack .../socat_1.7.3.1-1_amd64.deb ...
Unpacking socat (1.7.3.1-1) ...
Selecting previously unselected package kubelet.
Preparing to unpack .../kubelet_1.4.0-00_amd64.deb ...
Unpacking kubelet (1.4.0-00) ...
Selecting previously unselected package kubectl.
Preparing to unpack .../kubectl_1.4.0-00_amd64.deb ...
Unpacking kubectl (1.4.0-00) ...
Selecting previously unselected package kubeadm.
Preparing to unpack .../kubeadm_1.5.0-alpha.0-1534-gcf7301f-00_amd64.deb ...
Unpacking kubeadm (1.5.0-alpha.0-1534-gcf7301f-00) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up kubernetes-cni (0.3.0.1-07a8a2-00) ...
Setting up socat (1.7.3.1-1) ...
Setting up kubelet (1.4.0-00) ...
Setting up kubectl (1.4.0-00) ...
Setting up kubeadm (1.5.0-alpha.0-1534-gcf7301f-00) ...
 
Note:该示例中Kubernetes的几个包已经提前下载好放在apt-get的下载目录/var/cache/apt/archives中,因此没有连接谷歌下载的过程。当有多台机器需要安装时,可以只在一台机器下载并拷贝到其他节点即可。
 
本文永久更新地址:http://www.linuxdiyf.com/linux/25628.html