fix warning:
1.[WARNING Firewalld]: firewalld is active, please ensure ports [6443 10250] are open or your cluster may not function correctly
answer: systemctl stop firewalld.service
p>
2.[WARNING Service-Docker]: docker service is not enabled, please run ‘systemctl enable docker.service’
Systemctl enable docker.service
answer: systemctl enable docker.service
p>
3.[WARNING IsDockerSystemdCheck]: detected “cgroupfs” as the Docker cgroup driver. The recommended driver is “systemd”. Please follow the guide at https://kubernetes.io/docs/setup/cri/
a: p>
official documentation indicates that changing the Settings so that the container runtime and kubelet use systemd as the cgroup driver makes the system more stable. Notice that under Docker, you set the option native. Cgroupdriver = Systemd.
two solutions:
1. Edit docker configuration file /etc/docker/daemon.json
1 2 3 |
“exec-opts”: [“native.cgroupdriver=systemd”] systemctl daemon-reload systemctl restart docker |
2, edit the/usr/lib/systemd/system/docker. Service p>
1 2 3 |
ExecStart=/usr/bin/dockerd -H fd:// –containerd=/run/containerd/containerd.sock –exec-opt native.cgroupdriver=systemd systemctl daemon-reload systemctl restart docker |
command:
vi /usr/lib/systemd/system/docker.service
–exec-opt native. Cgroupdriver =systemd (append)
After setting
, you can see that the Cgroup Driver is systemd
through the docker info command
1 |
docker info | grep Cgroup |
p>
4.[WARNING FileExisting-tc]: tc not found in system path
solution:
cannot be installed with yum, yum has a version, but has been unable to load down.
can be installed with yum, yum server is also this version:
yum command: yum install tc-y
note: the version is very important. I tried several versions. Only 5.3.0-1 works
download RPM package:
p>
http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/iproute-tc-5.3.0-1.el8.x86_64.rpm
local installation:
yum localinstall – y iproute – tc – 5.3.0-1 RPM el8. X86_64. p>
5.[WARNING Hostname]: hostname “master” could not be reached
solution: see 6
6.[WARNING Hostname]: hostname “master”: lookup master on [fe80::1%ens33]:53: read udp [fe80::e0c:1711:9797:f6c7%ens33]:56921-> [fe80::1%ens33]:53: i/o timeout
error execution phase preflight: [preflight] Some fatal errors occurred:
solution:
The
command changes the host name
hostnamectl set-hostname k8s
change/etc/hostname p>
echo k8s > /etc/hostname
modifies the example
cat > > /etc/hosts < < EOF
192.168.100.4 master
192.168.100.5 node1
192.168.100.6 node2
EOF
, where IP is the address of the master node and the node node assigned to you
cleanup command:
p>
sudo kubeadm reset
if
$kubeadm init \
– apiserver – advertise – address = 192.168.44.146 \
– image – repository registry.aliyuncs.com/google_containers \
– kubernetes – version v1.18.0 \
– service – cidr = 10.96.0.0/12 \
– pod – network – cidr = 10.244.0.0/16 p>
that’s the step that’s going to go wrong, that’s the easiest step to go wrong. Master can’t boot up alive, so you can use this command.
caution, the test is nothing, it will not kill you (k8s) I am still a vegetable chicken, not only this command will bring side effects, but when the test, to solve the problem, it really works!
h1>
docker system prune -a
can be used to clean up disks, remove closed containers, useless data volumes, and networks
p>
Read More:
- Common errors in k8s initialization_ [WARNING NumCPU]_ [WARNING SystemVerification]_ WARNING Hostname
- Job for docker.service failed because the control process exited with error code. See systemctl sta
- docker service Failed to get D-Bus connection: Operation not permitted
- Raspberry Pi 3 installation and software configuration issues collection
- Solve the problem that Gabor can’t start itself after the server is restarted
- systemctl start docker Job for docker.service failed because the control process exited with error
- Warning: failed to get default registry endpoint from daemon
- Centos7 installing Kafka
- Error syncing pod, skipping: failed to “StartContainer” for “POD” with Image
- Centos7 quick installation of docker and configuration of image acceleration
- The deployment of etcd storage and flannel network configuration for kubernetes / k8s multi node deployment
- Error starting day: SELinux is not supported with the overlay 2
- linux docker Error Failed to get D-Bus connection: Operation not permitted
- CentOS7 nginx Failed to read PID from file /run/nginx.pid: Invalid argument?
- Error response from daemon: Get https://20.0.0.100/v2/: dial tcp 20.0.0.100:443: connect: connection
- Docker start error: failed to start docker application container engine.
- Failed to start Remote desktop service (VNC)
- [Sovled] Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
- Nginx start error: job for nginx.service failed because the control process exited with error code
- Docker service start, restart, close command