0

I have rancher 2.0 to manage kubernetes using RBAC access control, the kubeconfig I used for kubectl is simple, it shows the cluster server to rancher.

Then in some system like jenkins kubernetes plugin, how can I fill the information for kubernetes Name, Kubernetes URL, Kubernetes server certificate key, ...

see below

enter image description here

Larry Cai
  • 55,923
  • 34
  • 110
  • 156
  • Start with kubectl get secrets , remember to specify --kubeconfig path to your k8s cluster. –  Feb 11 '19 at 16:00

1 Answers1

0
  1. Access rancher and create an API key (save the access key and secret key)
  2. Access rancher, cluster, click on the kubectl link on the top right
  3. Within kubectl run the command cat ~/.kube/config (notice the certificate-authority file and notice the server)
  4. Run command cat /nonexistent/ssl/ca.cert (and save the certificate)

  5. On Jenkins (fill in the following) Kubernetes URL = [put the server in here] Kubernetes server certificate key = [put cert in here] Credential, click Add, create a username/password credential, use access key as username and secret key as password.

  6. Click on Test connection
Den
  • 1