how can i fix this kubernetes plugin in jenkins

4/8/2020

I have problem with Jenkins but Jenkins is connecting by my Kubernetes by this credentialsmykubeconfig but its show to me this error

ERROR: ERROR: Cannot find kubeconfig credentials with id mykubeconfig

java.lang.IllegalArgumentException: Cannot find kubeconfig credentials with id mykubeconfig

https://pasteboard.co/J2PGyNr.png

https://pasteboard.co/J2PGLEi.png

https://pasteboard.co/J2PGYKH.png https://pasteboard.co/J2PH8ye.png

-- ahmed yousry
jenkins
kubernetes

1 Answer

4/9/2020

When you're using Jenkins Kubernetes Deployment plugin, you have to create two credentials.

  1. Kind -> Secret file. Here you have to provide your kube config file. It'll be used in Cloud -> Kubernetes section to connect to Kubernetes cluster.
  2. Kind -> Kubernetes configuration(kubeconfig). Here you've to paste your kube config content or set path of kube config file. This need to be called in pipeline as kubeconfigId.
-- hariK
Source: StackOverflow