0

Jenkins version : 2.204.4 (hosted Jenkins in IBM server) Kubernetes plugin version: 1.24.1

Tested process 1: I am trying to configure Kubernetes plugin with the EKS cluster, but could not get any proper documentation. Can I please ask you how you configured it. I tried disabling the "http certificate check" and in secrets I gave "kubeconfig file" as a secret file and tested the connection and seen below error:

Test Connection - Error testing connection https://xxxxxxxxx.ap-southeast-2.eks.amazonaws.com: null

Tested process 2: Given Kubernetes url, disabled the "http certificate check" and haven't added passed any credentials and tested the connection, seen below error :, I still see the same error even after installing aws-iam-authenticator in Jenkins master.

Error testing connection Failure executing: GET at: . Message: pods is forbidden: User "system:anonymous" cannot list resource "pods" in API group "" in the namespace "default". Received status: Status(apiVersion=v1, code=403, details=StatusDetails(causes=[], group=null, kind=pods, name=null, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=pods is forbidden: User "system:anonymous" cannot list resource "pods" in API group "" in the namespace "default", metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=Forbidden, status=Failure, additionalProperties={}).

Can someone please help me in fixing this error?

kenlukas
  • 2,886
  • 2
  • 14
  • 25
yamini
  • 1
  • 1
  • Hi yamini, welcome to S.F. You do not appear to be using [the latest version of the plugin](https://plugins.jenkins.io/kubernetes/), which may explain the `NullPointerException` that you experienced -- are you on an old version on purpose? – mdaniel May 04 '20 at 16:03
  • no, wondering which version will get this sorted ? – yamini May 04 '20 at 23:16
  • I don't have any evidence updating will fix it, but if you're on the latest version, you are then in a better position to file a bug with them; you'll also want to check the Jenkins console to see if it emits the entire stack trace, in order to help them debug the issue if it isn't already fixed – mdaniel May 05 '20 at 00:04
  • 1
    Have you already considered using a kubernetes Service Account to avoid all that `aws-iam-authenticator` silliness? I mean `kubectl -n kube-system create sa jenkins && kubectl create clusterrolebinding --cluster-role=cluster-admin --serviceaccount=kube-system:jenkins jenkins` type deal – mdaniel May 05 '20 at 00:06
  • no I haven't tried that, will give a try and update. – yamini May 06 '20 at 01:12
  • it did not work – yamini May 22 '20 at 01:42

0 Answers0