<p>I have created a job in bamboo and created a ssh-task to run on my server. My server has already installed kubectl and below command executed successfully there.</p>

<pre><code> echo `kubectl get namespace`
</code></pre>

<p>But while running command through job, its showing below error:</p>

<pre><code> bash: line 5: kubectl: command not found
</code></pre>

kohi
<p>Please be sure that kubectl binary is in PATH of the user context, that your job is running in.</p>

<p>Otherwise you should use absolute path of kubectl executable, e.g. /usr/bin/kubectl)</p>

<ol>
<li>Indenity the location of kubectl executable: which kubectl</li>
<li>Move it from its current location to location included in PATH, e.g. "sudo mv ./kubectl /usr/local/bin/kubectl"</li>
</ol>
