I have installed jenkins on the ubuntu server. I have copied the config file to my home .kube/config folder. When I am running "kubectl get pods" command directly in the VM, it's running fine. But when I ran it in the jenkins pipeline the command is failing. I have tried it with providing --kubeconfig $PATHFORKUBECONFIG file.
Can anyone please help me with my query?
You have installed jenkins as a different user with custom PATH
environment. Access to the cluster uses the amazon iam-helper binary, which is not on the PATH
for the jenkins user.
Either add the location of the binary to your PATH
(of jenkins user) or put the binary to a location which is on the path, for example /usr/local/bin