Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-55788

Error when configuring Kubernetes Plugin v1.14.3

    XMLWordPrintable

Details

    Description

      I'm following the steps in this article to setup Jenkins on top of my Kubernetes (minikube) cluster. When I ask to Kubernetes plugin to test the connection with my cluster this message appears:

      Error testing connection https://192.168.99.113:8443: Failure executing: GET at: https://192.168.99.113:8443/api/v1/namespaces/default/pods. Message: Forbidden!Configured service account doesn't have access. Service account may have been revoked. pods is forbidden: User "system:serviceaccount:default:default" cannot list resource "pods" in API group "" in the namespace "default".

      {{}}
       

      Attachments

        Activity

          ravisharma134 Ravi Sharma added a comment -

          I am also facing the same issue. My jenkins master runs on K8s and trying the agent provisioning on same cluster and namespace.

          ravisharma134 Ravi Sharma added a comment - I am also facing the same issue. My jenkins master runs on K8s and trying the agent provisioning on same cluster and namespace.
          liyatikal liyatikal added a comment -

          You need to create a role for cluster-admin for your user:

          kubectl create clusterrolebinding permissive-binding --clusterrole=cluster-admin --user=admin --user=kubelet --group=system:serviceaccounts
          liyatikal liyatikal added a comment - You need to create a role for cluster-admin for your user: kubectl create clusterrolebinding permissive-binding --clusterrole=cluster-admin --user=admin --user=kubelet --group=system:serviceaccounts

          Get a valid kubeconfig, test with using kubectl, then provide it to Jenkins.

          vlatombe Vincent Latombe added a comment - Get a valid kubeconfig, test with using kubectl, then provide it to Jenkins.

          People

            mpacheco95 Michael Pacheco
            mpacheco95 Michael Pacheco
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: