Replies: 1 comment 1 reply
-
So if I run "sudo kubectl get nodes --kubeconfig=/etc/rancher/rke2/rke2.yaml" It will work. The endowment variable KUBECONFIG was not being set properly. So in RKE2, you have to run kubectl as root? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Switching from plain K8S to rke2 version v1.22.8+rke2r1 (bd020f4) go version go1.16.14b7.
Perhaps I am missing something real basic, but am I supposed to be able to run "kubectl get nodes" without being root?
The file permissions on /etc/rancher/rke2/rke2.yaml keeps getting reset to 0600, but then kubectl can't read the file. If I change the permissions to 0644, the command works without being root.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions