How to organize Kubernete cluster on GCP?

9/29/2017

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 ?

-- Ha Ja
google-cloud-platform
kubernetes

1 Answer

9/29/2017

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/"

-- Pawan Kumar
Source: StackOverflow