0

I edited env variables by pointing to kubectl and helm(after downloading them and storing into kube folder)

enter image description here

when I go for kubectl in cmd,I got 'kubectl' is not recognized as an internal or external command,

operable program or batch file.

Why?

2
  • 2
    Your Path does not seem to include the path that presumably contains kubectl.exe (i.e. C:\users\f85147\kube).
    – StarCat
    Nov 6, 2023 at 9:19
  • @StarCat how to add kube to Path? Nov 6, 2023 at 9:23

1 Answer 1

1

Environment variables are not automatically used this way. The only variable that Cmd uses to find the location of commands is PATH, which is a list of directories (not files) that Cmd will look in.

Since PATH is already there in your environment variable window, just edit it to include the path to your C:\users\f85147\kube directory.

(On Windows, 'Path' and 'PATH' are the same thing.)

Other variables such as 'helm' aren't used to find commands. They're only used through explicit expansion when you type %helm% in Cmd, or $helm in Bash, or $env:helm in PowerShell (but never bare helm) and this expands to whatever value you've set in the variable.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .