I have my on premise kubernetes cluster. I want to setup CD with jenkins. I have tried two plugins which are available for kubernetes deployment.
The question here is, jenkins master will require the .kube/config file to connect to the kubernetes cluster for doing deployments.
Is this the best practice to copy the .kube/config file of your kubernetes master to jenkins master to provide full acesss of your kubernetes cluster for deployment purpose.
Please do let me know if you have any other suggestions for my ON-PREM kubernetes cluster CD.
you have two options 1. put all kubeconfig files in a separate git repo, say, kubeVault .git, and name the files using cluster name. Accept cluster as build paramter in jenkins. Lookup the respective kubeconfig from kubeVault repo and use it as target platform and deploy the container. We have used this approach in one of the project. you need to build some logic in the pipeline groovy code