<p>I have configured the Kubernetes plugin to spin up slaves.
However I am having problems with access-control. 
Getting an error when the master tries to spin up new pods (slaves) </p>

<blockquote>
  <p>Unexpected exception encountered while provisioning agent Kubernetes Pod Template
  io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: <a href="https://kubernetes.default/api/v1/namespaces/npd-test/pods" rel="nofollow noreferrer">https://kubernetes.default/api/v1/namespaces/npd-test/pods</a>. Message: Forbidden!Configured service account doesn't have access. Service account may have been revoked..
      at io.fabric8.kubernetes.client.dsl.base.OperationSupport.requestFailure(OperationSupport.java:315)
      at io.fabric8.kubernetes.client.dsl.base.OperationSupport.assertResponseCode(OperationSupport.java:266)
      at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:237)
      at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:230)
      at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleCreate(OperationSupport.java:208)
      at io.fabric8.kubernetes.client.dsl.base.BaseOperation.handleCreate(BaseOperation.java:643)
      at io.fabric8.kubernetes.client.dsl.base.BaseOperation.create(BaseOperation.java:300)
      at org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud$ProvisioningCallback.call(KubernetesCloud.java:636)
      at org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud$ProvisioningCallback.call(KubernetesCloud.java:581)
      at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)</p>
</blockquote>

<p>I have checked the access of the default service account located at <code>/var/run/secrets/kubernetes.io/serviceaccount/token</code> and tried to create a pod in <code>https://kubernetes.default/api/v1/namespaces/npd-test/pods.</code> using the token and it works.</p>

<p>Not sure why the plugin is complaining that the service account does not have access.</p>

<p>I have tried configuring the Kubernetes plugin with None credentials and a Kubernetes Service Account Credential (no way to specify account), but neither works. </p>

<p>It is odd that the service account worked for you normally but didn't work in Jenkins. In my setup, I had to add a <code>RoleBinding</code> to give the service account the <code>edit</code> role (my namespace is actually <code>jenkins</code> but I changed it here to match your namespace).</p>

<pre><code>apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
  name: jenkins
  namespace: npd-test
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: edit
subjects:
- kind: ServiceAccount
  name: default
  namespace: npd-test
</code></pre>

<p>After I did that, I configured the Kubernetes Cloud plugin like this and it works for me.</p>

<pre><code>Kubernetes URL: https://kubernetes.default.svc.cluster.local
Kubernetes server certificate key:
Disable https certificate check: off
Kubernetes Namespace: npd-test
Credentials: - none -
</code></pre>
