kubernetes installation encountered problems and solutions

Depending on the machine environment, and some may once installation is successful, others may encounter a variety of pit needs investigation is recommended that users not familiar with the new linux environment to install kubernetes. I have the following records in the installation process problems encountered and solutions.

Lack docker

Because it is installed in accordance with the steps, just before the start of loading several machines when they are looking at very seriously, to the back getting edgy, and when installed nodes join the cluster prompts for docker, this time to perform on the node dockerdiscovery command docker does not exist, this time only to find docker not successfully installed.

Installation docker Times container-selinux> = 2.9 error

Since the test machine environment is different approval come, first installation is very order, the second batch is placed directly in the PC office, but also very order, the installation process meet all kinds of trouble.

Mentioned above, we found docker not installed successfully joins the cluster, when you install the following error docker

Error: Package: docker-ce-18.03.1.ce-1.el7.centos.x86_64 (docker-ce-edge)
           Requires: container-selinux >= 2.9
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

This error is the cause of low container-selinux version or is not installed

yum install yum container-selinux general you can not find the source package

Need to install epel source yum install container-selinux

Then install the docker-ce on it.

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

epel source on the yum install epel-release # aliyun

yum makecache

然后yum install container-selinux

After adding a cluster node status it has been NotReady

This error can be executed on the machine node journalctl -f -u kubeletview kubelet output log information.

Find the following error

Container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized

This error message is very clear, the network plug-in is not ready. We can execute the command docker images|grep flannelto see whether the image has been successfully flannel pull down. After investigation, flannel mirrored pull a bit slow, wait a minute after ok.

If you wait a long time still did not pull down flannel mirror can be used docker saveto save flannel mirrors on the master node is a compressed file, and then execute on the current node docker loadto load the specific operation of other sections of presentations, you can find or view the official document. Another way is to use a presentation on how to pull gcr.io or mirrored on quay.io method to manually pull up the mirror.

Error when adding a cluster node

When a node joins the cluster, it may report a variety of errors, some easy to solve, some might sometimes can not find a good solution. This time you can try to use the kubeadm resetcommand to reset it, and then re-join.

Guess you like

Origin www.cnblogs.com/tylerzhou/p/10974940.html