Let's say I have two projects: a jenkins ci
and a small application
(deployed with jenkins). Should I put them in the same cluster ?
This is the commands I run inside Jenkinsfile to deploy the app:
sh("kubectl --namespace=production apply -f k8s/services/")
sh("kubectl --namespace=production apply -f k8s/production/")
In case it's better to put them in separate cluster, how can I use kubectl
to apply the resources inside another cluster ?
If want to use 2 cluster then put both cluster config in 2 different kube config and then call these file while executing kubectl, like below kubectl --kubeconfig --namespace=production apply -f k8s/services/"