Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")
成都创新互联公司长期为近千家客户提供的网站建设服务,团队从业经验10年,关注不同地域、不同群体,并针对不同对象提供差异化的产品和服务;打造开放共赢平台,与合作伙伴共同营造健康的互联网生态环境。为汉川企业提供专业的成都做网站、网站建设、外贸营销网站建设,汉川网站改版等技术服务。拥有10多年丰富建站经验和众多成功案例,为您定制开发。
root@ubuntu:~# kubectl get svcUnable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")root@ubuntu:~# rm -rf $HOME/.kuberoot@ubuntu:~# mkdir -p $HOME/.kuberoot@ubuntu:~# sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/configroot@ubuntu:~# sudo chown $(id -u):$(id -g) $HOME/.kube/configroot@ubuntu:~# kubectl get svcNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEkubernetes ClusterIP 10.96.0.1443/TCP 9m30s
先删除 $HOME/.kube
node NotReady
root@ubuntu:~# kubectl get nodeNAME STATUS ROLES AGE VERSIONubuntu NotReady master 12m v1.17.3
因为没有创建flannel网络
root@ubuntu:~# kubectl create -f kube-flannel.ymlpodsecuritypolicy.policy/psp.flannel.unprivileged createdclusterrole.rbac.authorization.k8s.io/flannel createdclusterrolebinding.rbac.authorization.k8s.io/flannel createdserviceaccount/flannel createdconfigmap/kube-flannel-cfg createddaemonset.apps/kube-flannel-ds-amd64 createddaemonset.apps/kube-flannel-ds-arm64 createddaemonset.apps/kube-flannel-ds-arm createddaemonset.apps/kube-flannel-ds-ppc64le createddaemonset.apps/kube-flannel-ds-s390x createdroot@ubuntu:~# kubectl get nodeNAME STATUS ROLES AGE VERSIONubuntu NotReady master 14m v1.17.3
等待 网络创建完成
root@ubuntu:~# kubectl get nodeNAME STATUS ROLES AGE VERSIONubuntu Ready master 15m v1.17.3