码迷,mamicode.com
首页 > Web开发 > 详细

kubernetes 常见错误

时间:2020-02-21 09:42:53      阅读:287      评论:0      收藏:0      [点我收藏+]

标签:flannel   clust   service   root   sig   nal   art   etc   security   

  • 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")
  • root@ubuntu:~# kubectl get svc
    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")
    root@ubuntu:~# rm -rf $HOME/.kube
    root@ubuntu:~# mkdir -p $HOME/.kube
    root@ubuntu:~# sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
    root@ubuntu:~# sudo chown $(id -u):$(id -g) $HOME/.kube/config
    root@ubuntu:~# kubectl get svc
    NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
    kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 9m30s

    先删除 $HOME/.kube

    1. node NotReady

    root@ubuntu:~# kubectl get node
    NAME STATUS ROLES AGE VERSION
    ubuntu NotReady master 12m v1.17.3

    因为没有创建flannel网络

    root@ubuntu:~# kubectl create -f kube-flannel.yml
    podsecuritypolicy.policy/psp.flannel.unprivileged created
    clusterrole.rbac.authorization.k8s.io/flannel created
    clusterrolebinding.rbac.authorization.k8s.io/flannel created
    serviceaccount/flannel created
    configmap/kube-flannel-cfg created
    daemonset.apps/kube-flannel-ds-amd64 created
    daemonset.apps/kube-flannel-ds-arm64 created
    daemonset.apps/kube-flannel-ds-arm created
    daemonset.apps/kube-flannel-ds-ppc64le created
    daemonset.apps/kube-flannel-ds-s390x created
    root@ubuntu:~# kubectl get node
    NAME STATUS ROLES AGE VERSION
    ubuntu NotReady master 14m v1.17.3

    等待 网络创建完成

    root@ubuntu:~# kubectl get node
    NAME STATUS ROLES AGE VERSION
    ubuntu Ready master 15m v1.17.3

    kubernetes 常见错误

    标签:flannel   clust   service   root   sig   nal   art   etc   security   

    原文地址:https://blog.51cto.com/appop/2472623

    (0)
    (0)
       
    举报
    评论 一句话评论(0
    登录后才能评论!
    © 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
    迷上了代码!