Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Cannot find kubeconfig for some environments #301

Open
nayutah opened this issue Apr 7, 2024 · 1 comment
Open

[BUG] Cannot find kubeconfig for some environments #301

nayutah opened this issue Apr 7, 2024 · 1 comment
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@nayutah
Copy link
Collaborator

nayutah commented Apr 7, 2024

Describe the bug
For k8s env created by k3s, get error when install kubeblocks
slc@kata-1:~$ kbcli kubeblocks install --version="0.8.2"
The connection to the server localhost:8080 was refused - did you specify the right host or port?

kbcli cannot find the kubeconfig file when traversing all possible config paths:
openat(AT_FDCWD, "/sys/kernel/mm/transparent_hugepage/hpage_pmd_size", O_RDONLY) = 3
openat(AT_FDCWD, "/etc/localtime", O_RDONLY) = 3
openat(AT_FDCWD, "/usr/local/bin/kbcli", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/proc/sys/kernel/cap_last_cap", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/proc/stat", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/proc/stat", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/home/slc/.kbcli/cluster_types", O_RDONLY|O_CLOEXEC) = 7
openat(AT_FDCWD, "/home/slc/.kbcli/charts", O_RDONLY|O_CLOEXEC) = 7
openat(AT_FDCWD, "/home/slc/.kbcli/cluster_types", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 7
openat(AT_FDCWD, "/home/slc/.kube/config", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/resolv.conf", O_RDONLY|O_CLOEXEC) = 7
openat(AT_FDCWD, "/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 7
openat(AT_FDCWD, "/etc/hosts", O_RDONLY|O_CLOEXEC) = 7

Then at last, it uses the 'localhost:8080' to have another try.

Please give more suggestions when no kubeconfig is available.
For e.g, "Please set the right kubeconfig file to /home/$user/.kube/.kubeconfig"
Or adapt to other k8s envs like k3s/k0s/minikube....

@nayutah nayutah added the bug Something isn't working label Apr 7, 2024
@ldming ldming added the good first issue Good for newcomers label May 8, 2024
@ldming ldming removed their assignment May 8, 2024
Copy link

This issue has been marked as stale because it has been open for 30 days with no activity

@github-actions github-actions bot added the Stale label Jun 10, 2024
@nayutah nayutah self-assigned this Aug 4, 2024
@github-actions github-actions bot removed the Stale label Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants