Imperative commands are not working

Used Imperative command to get pod configuration and store it into another yaml file. Command giving error “command not found” @Inderpreet @Tej-Singh-Rana

Hello, @pratikshag
There is only issue I figured it out.

  1. You are storing file in the (/) path. so it’s not possible through normal user.
  2. In the kubernetes, User access cluster through kubeconfig file. which is located at path $HOME/.kube/config. In case of root user, it’s not there.
    You can check the hidden files in linux ls -a.
    This is set for thor user.
  3. Please try again with the thor user and don’t save file in the / (slash) path, so you won’t get permission issue.
    Hope these 3 steps, will help you to complete your task and to understand the kubernetes process.

I tried this command but not exactly getting what to do next.

@pratikshag I think you have to simply do
$ cd
then run the command.
$ kubectl ....
I think you didn’t notice my step 1. Still you are in the slash(/) path. You are not in the thor home directory.

Got it…Thanks @Tej-Singh-Rana

1 Like