x509 certificate signed by unknown authority- Kubernetes

后端 未结 5 2226
-上瘾入骨i
-上瘾入骨i 2021-02-19 03:32

I am configuring Kubernetes cluster with 2 nodes in coreos as described in https://coreos.com/kubernetes/docs/latest/getting-started.html without flannel. Both

5条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-19 03:56

    The above mentioned regular method does not work. I have tried to use the complete commands for a successful certificate. Please see the commands as follows.

    $ sudo kubeadm reset
    $ sudo swapoff -a 
    
    $ sudo kubeadm init --pod-network-cidr=10.244.10.0/16 --kubernetes- 
      version "1.18.3"
    $ sudo rm -rf /home/cm/.kube
    
    $ mkdir -p $HOME/.kube
    $ sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
    $ sudo chown $(id -u):$(id -g) $HOME/.kube/config
    
    $ sudo systemctl enable docker.service
    $ sudo service kubelet restart
    
    $ kubectl get nodes
    

    Notes:

    If the port refuses to be connected, please add the following command.

    $ export KUBECONFIG=$HOME/admin.conf
    

提交回复
热议问题