I’m glad to inform you that the issue has been successfully resolved by following the valuable recommendations from the community. It was something to do with RBAC. Just for a reference, here’s an overview of the steps took to address the issue:
- Utilized
kubectl
commands to gather essential information about the existing roles and role bindings within the Kubernetes cluster. - Created the necessary roles and role bindings to establish seamless communication between Jenkins and the Kubernetes API server. A reference YAML file available at https://github.com/jenkinsci/helm-charts/blob/fa9c3e1d4a0c5b3c2c8d513a4ab574a58a967e09/charts/jenkins/templates/rbac.yaml#L5 was used to mock the changes.
With the issue now resolved, there is no further action required. Thanks much!!
-Rajesh