<p>I want to create a CI/CD pipeline using Jenkins wherein I want to add a K8s master node as a slave to my Jenkins master setup. My question is is it a good idea? I am planning to create a username Jenkins on one of the masters, copy the kubeconfig to the user, connect the master to this node and then run all the Kubernetes deployments from this node. </p>

<p>Is there a better way to do this?</p>

devops84uk
<p>Sure, why not. If you are looking at running tests that don't require a production like system, I'd recommend using something like <a href="https://kubernetes.io/docs/setup/minikube/" rel="nofollow noreferrer">minikube</a> on your Jenkins slave. </p>

<p>Make sure that minikube is configured as the <code>jenkins</code> user and also make sure you don't have any other standalone Kubernetes component (kube-proxy, kube-apiserver, kube-controller-manager, etc) on your server that might conflict with the minikube installation.</p>
