k8s kubeadm reason install the network can not access the Columbia Valley and gpg: no valid OpenPGP data found a solution.

gpg: no valid OpenPGP data found a solution.

To be done. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

In this card to help
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -

 

Solution: http://windgreen.me/2018/02/23/%E5%9B%BD%E5%86%85%E4%BD%BF%E7%94%A8kubernetes%E8%B8%A9%E8% BF% 87% E7% 9A% 84% E5% 9D% 91 /

 

Because they can not access Google, it will be stuck in the curl this step. Then the solution is of course FQ.

I'm here to install on a server abroad have SS, SS server if there is no direct use ssh tunnel should be possible. Ss, then there is a local need to use ss local. It is recommended to use docker run ss, so exhausted that is deleted, it is convenient.

I use the mirror is: https: //hub.docker.com/r/mritd/shadowsocks/

When you are ready foreign server, the server is installed in the domestic tsocks

Editor vi /etc/tsocks.conf

Ip is a local server

server_type 5 is meant socks5

server_port local proxy port, like ss_local on the line.

When you're ready ladder, start installing software

One point to note here is that if the country with Ali cloud server, the source might use the network address, so that the implementation of the direct use of tsocks apt update will be out this error below

W: The repository ‘http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates Release’ does not have a Release file.

or

Err:9 http://mirrors.cloud.aliyuncs.com/ubuntu xenial Release
Connection failed

This time vi /etc/apt/source.list.d/source.aliyun.list

All http://mirrors.cloud.aliyuncs.com instead http://mirrors.aliyun.com will be able to use a proxy update, before a change can be backed up, and then run back to the network.

After installing the software, you will be stuck in kubeadm init, using tsocks kubeadm init does not solve the problem.

unable to get URL “https://dl.k8s.io/release/stable-1.9.txt”: Get https://storage.googleapis.com/kubernetes-release/release/stable-1.9.txt: dial tcp 172.217.160.112:443: i/o timeout

Here we specify kubernetes vuersion to skip this,

kubeadm -kubernetes init-version = 1.9.3

If you do not prepare in advance a mirror, usually stuck in here

[init] This might take a minute or longer if the control plane images have to be pulled.

Unfortunately, an error has occurred:Unfortunately, an error has occurred: timed out waiting for the condition
This error is likely caused by: – The kubelet is not running – The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled) – There is no internet connection, so the kubelet cannot pull the following control plane images: – gcr.io/google_containers/kube-apiserver-amd64:v1.9.3 – gcr.io/google_containers/kube-controller-manager-amd64:v1.9.3 – gcr.io/google_containers/kube-scheduler-amd64:v1.9.3

So we need to be ready ahead of the mirror. Way I'm using on that server abroad under the pull mirroring, then push to hub.docker.com, then from hub.docker.com pull to domestic server.

This script is written to run on servers abroad, which will be <username> and <password> hub.docker.com into your account password on the line.

In the country and then run the following script

In this way, the mirror needs to put kubernetes are ready. Then execute init would be no problem.

In addition there is a little trick in the init process, the other to open a terminal and run

journalctl -f -u kubelet.service

可以查看具体是什么愿意卡住了。

Guess you like

Origin www.cnblogs.com/Tom-yi/p/k8s.html