<p>I have a jenkins on my <a href="http://localhost:8080/" rel="nofollow noreferrer">http://localhost:8080/</a> and I created a project which will run a kubectl command to connect to a kubernetes cluster using (minikube)</p>

<p>I'm trying to run a windows command
C:\Program Files (x86)\Jenkins\workspace\test2>kubectl apply -f .\my-deployment.yaml </p>

<p>Here's the minikube cluster info
Kubernetes master is running at <a href="https://192.168.99.100:8443" rel="nofollow noreferrer">https://192.168.99.100:8443</a></p>

<p>on Jenkins my build environment is like
<a href="https://i.stack.imgur.com/m1Rhv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/m1Rhv.png" alt="here&#39;s my kubernetes kubectl config in Jenkins"></a></p>

<p>Is there a default credential when connecting to minikube? I used default-admin with no password or admin/admin </p>

<p>I'm getting this error during Jenkins build</p>

<pre><code>C:\Program Files (x86)\Jenkins\workspace\test2&gt;kubectl apply -f .\my-deployment.yaml 

error: You must be logged in to the server (the server has asked for the client to provide credentials)
</code></pre>

<p>Thanks for your answers.</p>

<p>Minikube makes use of SSL certificates to connect to the API server. Then you need to use that certificate to properly identify yourself. You can find the information in your <code>.kube/config</code> file. </p>
