Brief-Wishbone9091
Member
I set hostnames in each machine.
I set /etc/hosts record in each machine.
I disabled selinux in each machine.
I disabled firewall in each machine.
I disabled swap in each machine.
I install docker in each machine using
docs.docker.com
I install kubernetes in each machines.
I install kubeadm etc sudo yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes
I installed cri-dockerd using this documentation
github.com
I did sudo kubeadm init in master and get the following error.
To fix this error, I found this article
https://devops.stackexchange.com/questions/16799/kubernetes-trouble-adding-node-to-cluster
And decided to do this.
It was taking foreever to finish. Then, it finished. I ran these commands on master node.
Then I run this command on worker nodes
Then I get this error:
I set /etc/hosts record in each machine.
I disabled selinux in each machine.
I disabled firewall in each machine.
I disabled swap in each machine.
I install docker in each machine using
Install Docker Engine on CentOS
Learn how to install Docker Engine on CentOS. These instructions cover the different installation methods, how to uninstall, and next steps.
I install kubernetes in each machines.
I install kubeadm etc sudo yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes
I installed cri-dockerd using this documentation
GitHub - Mirantis/cri-dockerd: dockerd as a compliant Container Runtime Interface for Kubernetes
dockerd as a compliant Container Runtime Interface for Kubernetes - GitHub - Mirantis/cri-dockerd: dockerd as a compliant Container Runtime Interface for Kubernetes
I did sudo kubeadm init in master and get the following error.
Code:
[root@master ~]# sudo kubeadm init
Code:
Found multiple CRI endpoints on the host. Please define which one do you wish to use by setting the 'criSocket' field in the kubeadm configuration file: unix:///var/run/containerd/containerd.sock, unix:///var/run/cri-dockerd.sock To see the stack trace of this error execute with --v=5 or higher
To fix this error, I found this article
https://devops.stackexchange.com/questions/16799/kubernetes-trouble-adding-node-to-cluster
And decided to do this.
Code:
sudo kubeadm init --cri-socket unix:///var/run/cri-dockerd.sock
It was taking foreever to finish. Then, it finished. I ran these commands on master node.
Code:
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
Then I run this command on worker nodes
Code:
kubeadm join 192.168.169.149:6443 --token 11z7md.r0zqqcah3h8xpfof --discovery-token-ca-cert-hash sha256:ec515a5e58a6b402c7a5d9d3331efb708ef811ca65641c2f9 --cri-socket unix:///var/run/cri-dockerd.sock
Then I get this error:
Code:
[WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
error execution phase preflight: couldn't validate the identity of the API Server: invalid discovery token CA certificate hash: invalid hash "sha256:ec515a5e58a6b402c7a5d9d3331efb708ef811ca65641c2f9", expected a 32 byte SHA-256 hash, found 24 bytes
To see the stack trace of this error execute with --v=5 or higher