0

I installed k3s using the following command. I'm using Vagrant box with opensuse. curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.19.5+k3s1 K3S_KUBECONFIG_MODE="644" sh - It successfully installed.

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'.

But when I run the following helm add repo command and the connection time out error message appears. I also export the kubeconfig file 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

When I run helm list command, the following message shows.

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

When I run helm list command, the following message is shown.

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

Any ideas for adding helm repo successfully to solve this issues. Thank in advance.

Aye
  • 19
  • 8
  • 1 - warning messages are about access rights. You should make it to `600` based on warning shown. 2 - check firewall/network connectivity outside of the VM where kubernetes cluster is running. 3 - not sure why last error points to localhost. Is `.kube/config` available? – moonkotte Nov 09 '21 at 11:03
  • I did the ```chmod 600 ~/.kube/config``` but when I try ```helm list``` the above error shown. I turned off the windows firewall and tested it again but it do not work yet properly. In the virtual box, ```kubectl cluster-info``` command works proper, but in the host windows machine, connection refused error appear. – Aye Nov 10 '21 at 00:23
  • How did you install k3s? Is it directly installed on VM? Did you set up everything like `kubectl` and context on your Windows machine to connect to VM? Try to run `helm list` inside your VM. And add repo again. If you still see the error, check connection from that VM to outside internet. Most likely VM doesn't have internet access due to incorrect setup of firewall, network or anything else. – moonkotte Nov 10 '21 at 08:04

0 Answers0