kubeedge The connection to the server localhost:8080 was refused( 這個錯誤目前國內國外都是關於kubenetes的)

The connection to the server localhost:8080 was refused?

之前用kind搭好了環境,但關機後運行
kubeclt get nodes 

在網上找了很多資料,但都是基於kubenetes的回答。kubeedge下也沒有文件/etc/kubernetes/admin.conf

sudo cp /etc/kubernetes/admin.conf $HOME/
sudo chown $(id -u):$(id -g) $HOME/admin.conf
export KUBECONFIG=$HOME/admin.conf

解決:

// 1、刪除之前的
kind delete cluster

sudo tee /root/kind.yaml <<-'EOF'
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
  apiServerAddress: "127.0.0.1"
  apiServerPort: 6443
nodes:
  - role: control-plane
    image: kindest/node:v1.17.2
EOF

// 2、重新創建
kind create cluster --config=/root/kind.yaml

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章