title: Jenkins pipeline: kubectl: not found
body: <p>I have the following Jenkinsfile:</p>
  <pre><code>node {
    stage('Apply Kubernetes files') {
      withKubeConfig([credentialsId: 'jenkins-deployer', serverUrl: 'https://192.168.64.2:8443']) {
        sh 'kubectl apply -f '
      }
    }
  }
  </code></pre>
  <p>While running it, I got &quot;kubectl: not found&quot;. I installed Kubernetes-cli plugin to Jenkins, generated secret key via <code>kubectl create sa jenkins-deployer</code>. What's wrong here?</p>