Bug 1956652 - Jenkins throws KubernetesAuthException when starting Pod Agent
Summary: Jenkins throws KubernetesAuthException when starting Pod Agent
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Jenkins
Version: 4.6
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: Akram Ben Aissi
QA Contact: Jitendar Singh
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-04 07:40 UTC by Simon Krenger
Modified: 2021-05-04 12:56 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-04 12:56:24 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 6016001 0 None None None 2021-05-04 12:11:50 UTC

Comment 2 Akram Ben Aissi 2021-05-04 12:56:24 UTC
As discussed and investigated, this is related to the use of JCasC plugin which overrides a credential that we generate on Jenkins startup.
This credential is not needed anymore with recent versions of kubernetes plugin, so, clicking "Save" in "Nodes and Clouds" solves the issue.
The other resolver is to declare the credential in JCasC with the hardocded id: 1a12dfa4-7fc5-47a7-aa17-cc56572a41c7 :

```
credentials:
  system:
    domainCredentials:
      - credentials:
          - string:
              scope: GLOBAL
              id: "my-id"
              secret: "my-secret"
              description: "my desc"
          - fileSystemServiceAccountCredential:
              scope: GLOBAL
              id: "1a12dfa4-7fc5-47a7-aa17-cc56572a41c7"
              description: "ServiceAccountToken"
```


Note You need to log in before you can comment on or make changes to this bug.