<p>I'm currently using Kubernetes Client Plugin in Jenkins but still it's confusing to configure, because it looks for Kubernetes config, and those credetials are not available even I configured them in the credentials section.</p>

<p>Please see the screenshot below for my credentials which are configure in my Jenkins.</p>

<p><a href="https://i.stack.imgur.com/2C6rN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2C6rN.png" alt="enter image description here"></a></p>

<p>When I do try to add those credentials from Jenkins side, which is not listed under the Kubernetes credentials. The red colored are has no kist of my credentials.</p>

<p><a href="https://i.stack.imgur.com/EIlik.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EIlik.png" alt="enter image description here"></a></p>

<p>How can I configure this Kubernetes plugin in Jenkins ? or any other alternative methods to configure Jenkins + Amazon EKS ?</p>

<p>Thanks.</p>

<p>Plugin : <a href="https://wiki.jenkins.io/display/JENKINS/Kubernetes+Plugin" rel="nofollow noreferrer">https://wiki.jenkins.io/display/JENKINS/Kubernetes+Plugin</a></p>

Madura Dissanayake
<p>To reproduce your issue I have installed EKS using <a href="https://logz.io/blog/amazon-eks/" rel="nofollow noreferrer">Deploying a Kubernetes Cluster with Amazon EKS</a> article.</p>

<p>After adding worker nodes next steps were performed:</p>

<p>1) install helm</p>

<p>2) install jenkins from stable/jenkins chart.</p>

<pre><code>curl https://raw.githubusercontent.com/helm/helm/master/scripts/get | bash
kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller
helm search jenkins
helm install stable/jenkins --name myjenkins

If you want to change any parameters before deploying helm chart, you can first download and edit values.
helm inspect values stable/jenkins &gt; /tmp/jenkins.values
helm install stable/jenkins --values /tmp/stable_jenkins.values --name myjenkins
</code></pre>

<p>Wait until everything will be deployed, you can check via <code>watch kubectl get all --all-namespaces</code></p>

<pre><code>kubectl get all --all-namespaces
NAMESPACE     NAME                                READY   STATUS    RESTARTS   AGE
default       pod/myjenkins-c9bc6bbbc-hvdzg       1/1     Running   0          19m
kube-system   pod/aws-node-5swq5                  1/1     Running   0          21m
kube-system   pod/aws-node-h5vl7                  1/1     Running   0          20m
kube-system   pod/aws-node-ttkgn                  1/1     Running   0          21m
kube-system   pod/coredns-7fb855c998-7lglx        1/1     Running   0          48m
kube-system   pod/coredns-7fb855c998-h7stl        1/1     Running   0          48m
kube-system   pod/kube-proxy-drvc2                1/1     Running   0          21m
kube-system   pod/kube-proxy-gfwh8                1/1     Running   0          20m
kube-system   pod/kube-proxy-kscm8                1/1     Running   0          21m
kube-system   pod/tiller-deploy-5d6cc99fc-7mv88   1/1     Running   0          45m


NAMESPACE     NAME                      TYPE           CLUSTER-IP       EXTERNAL-IP                                                               PORT(S)          AGE
default       service/kubernetes        ClusterIP      10.100.0.1       &lt;none&gt;                                                                    443/TCP          48m
default       service/myjenkins         LoadBalancer   10.100.9.131     ***********************************-*******.eu-west-1.elb.amazonaws.com   8080:30878/TCP   19m
default       service/myjenkins-agent   ClusterIP      10.100.28.95     &lt;none&gt;                                                                    50000/TCP        19m
kube-system   service/kube-dns          ClusterIP      10.100.0.10      &lt;none&gt;                                                                    53/UDP,53/TCP    48m
kube-system   service/tiller-deploy     ClusterIP      10.100.250.226   &lt;none&gt;                                                                    44134/TCP        45m

NAMESPACE     NAME                        DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
kube-system   daemonset.apps/aws-node     3         3         3       3            3           &lt;none&gt;          48m
kube-system   daemonset.apps/kube-proxy   3         3         3       3            3           &lt;none&gt;          48m

NAMESPACE     NAME                            READY   UP-TO-DATE   AVAILABLE   AGE
default       deployment.apps/myjenkins       1/1     1            1           19m
kube-system   deployment.apps/coredns         2/2     2            2           48m
kube-system   deployment.apps/tiller-deploy   1/1     1            1           45m

NAMESPACE     NAME                                      DESIRED   CURRENT   READY   AGE
default       replicaset.apps/myjenkins-c9bc6bbbc       1         1         1       19m
kube-system   replicaset.apps/coredns-7fb855c998        2         2         2       48m
kube-system   replicaset.apps/tiller-deploy-5d6cc99fc   1         1         1       45m
</code></pre>

<p>Next </p>

<pre><code>1. Get your 'admin' user password by running:
  printf $(kubectl get secret --namespace default myjenkins -o jsonpath="{.data.jenkins-admin-password}" | base64 --decode);echo
2. Get the Jenkins URL to visit by running these commands in the same shell:
  NOTE: It may take a few minutes for the LoadBalancer IP to be available.
        You can watch the status of by running 'kubectl get svc --namespace default -w myjenkins'
  export SERVICE_IP=$(kubectl get svc --namespace default myjenkins --template "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}")
  echo http://$SERVICE_IP:8080/login

3. Login with the password from step 1 and the username: admin
</code></pre>

<ul>
<li><p>Open browser, login and go to "Manage Jenkins"-->"Configure System"--> Cloud Section</p></li>
<li><p>Click Add - Jenkins</p></li>
<li><p>Choose <code>Kubernetes Service Account</code> and click add..
<a href="https://i.stack.imgur.com/OcNO5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OcNO5.png" alt="enter image description here"></a></p></li>
<li><p>Next chose "Secret Text" in drop down menu left to Add button, Test connection, apply and save.
<a href="https://i.stack.imgur.com/Q5SKA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q5SKA.png" alt="enter image description here"></a></p></li>
</ul>

<p>-Check Credentials:
<a href="https://i.stack.imgur.com/cVahj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cVahj.png" alt="enter image description here"></a></p>

<p>-Check again "Manage Jenkins"-->"Configure System"--> Cloud Section
<a href="https://i.stack.imgur.com/NPUqK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NPUqK.png" alt="enter image description here"></a></p>

<p>Hope it helps...</p>
