0

我使用以下命令安装了 k3s。我正在使用带有 opensuse 的 Vagrant 盒子。 curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.19.5+k3s1 K3S_KUBECONFIG_MODE="644" sh - 它安装成功。

kubectl version

Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.5+k3s1", GitCommit:"b11612e2744f39f01bfd208ff97315930c483667", GitTreeState:"clean", BuildDate:"2020-12-11T17:29:23Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.5+k3s1", GitCommit:"b11612e2744f39f01bfd208ff97315930c483667", GitTreeState:"clean", BuildDate:"2020-12-11T17:29:23Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"} 
kubectl cluster-info

Kubernetes master is running at https://127.0.0.1:6443
CoreDNS is running at https://127.0.0.1:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
Metrics-server is running at https://127.0.0.1:6443/api/v1/namespaces/kube-system/services/https:metrics-server:/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

但是当我运行以下 helm add repo 命令时,会出现连接超时错误消息。我还导出了 kubeconfig 文件export KUBECONFIG=~/.kube/config

helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/.kube/config
Error: looks like "https://prometheus-community.github.io/helm-charts" is not a valid chart repository or cannot be reached: Get "https://prometheus-community.github.io/helm-charts/index.yaml": dial tcp 185.199.108.153:443: connect: connection timed out

当我运行helm list命令时,显示以下消息。

WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/.kube/config
NAME    NAMESPACE       REVISION        UPDATED STATUS  CHART   APP VERSION

当我运行helm list命令时,会显示以下消息。

Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version?timeout=32s": dial tcp [::1]:8080: connect: connection refused

成功添加 helm repo 以解决此问题的任何想法。预先感谢。

4

0 回答 0