<p>I want to deploy my pods on kube8 cluster using jenkins job.
But when  check kubectl version :</p>

<pre><code>Client Version: version.Info{Major:"1", Minor:"11",
GitVersion:"v1.11.6",
GitCommit:"b1d75deca493a24a2f87eb1efde1a569e52fc8d9",
GitTreeState:"clean", BuildDate:"2018-12-16T04:39:52Z",
GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"} Error
from server (Forbidden): &lt;html&gt;&lt;head&gt;&lt;meta http-equiv='refresh'
content='1;url=/securityRealm/commenceLogin?from=%2Fversion%3Ftimeout%3D32s'/&gt;&lt;script&gt;window.location.replace('/securityRealm/commenceLogin?from=%2Fversion%3Ftimeout%3D32s');&lt;/script&gt;&lt;/head&gt;&lt;body
style='background-color:white; color:white;'&gt;
</code></pre>

<p>And kubectl cluster-info </p>

<pre><code>Kubernetes master is running at http://localhost:8080
</code></pre>

<p>It is not getting connected with server.
I have exported all the required Environment variables such as AWS_KEY etc to access the cluster. When i ssh into machine and manually export env variables and check kubectl version , it works fine .</p>

Gaurav Gola
<p>you must be using jenkins service account to deploy the pod. ensure the service account has proper roles and rolebinding attached to deploy the pods in the cluster.</p>
