Not able to run kubernetes commands

Hi Team,

I have installed rancher in a Kubernetes cluster using k3s and helm.
When i logout from the server and login again i´m not able to run helm and Kubernetes commands.
image

I
I only succeed when i set this command

PATH=$PATH:/usr/local/bin
why i have this behavior?

You mean apart from the obvious … that the kubectl and helm cli binaries are installed at that path ?

1 Like

helm and kubectl binaries not in the /usr/local/bin, copy both binaries to /usr/local/bin

1 Like

Main reason: you are working as root ( and root does not have /usr/local/bin in its path list for security reasons).
Always use a “normal” user account for anything that is not system adminstration ( and then most often sudo is the better choice)

1 Like