On Thursday, 16 February 2017 21:18:42 UTC, Kubernetes learner  wrote:
> what is the best strategy to deploy images to Kubernetes with YAML from a 
> remote server (Jenkins)

We orchestrate all our provisioning of other GKE clusters, GCE, CloudSQL, Cloud 
Storage, Networks etc from Jenkins running on a different GKE cluster in a 
different GCP project.  Works great.

I just followed the tutorial I found for deploying Jenkins on GKE and scripted 
it all into Makefiles.  With a bit of mucking about it works well.

We use a LoadBalancer k82 service, not Ingress, in order to be able to define 
inbound f/w rules.

All deployments/statefulsets/services/ingress etc that jenkins deploys are 
defined as yaml.  Jenkins on GKE spins up slave pods within which it executes 
the work.  It downloads the branch or whatever from github and uses kubectl to 
delete/apply the yamls as appropriate to the remote GKE clusters all running in 
different projects.

Tuturoal here (inc a Dockerfile for the slave image, so you can upgrade it to 
inc kubectl etc):
https://cloud.google.com/solutions/jenkins-on-container-engine

Rem_ to add the Service Account for the GKE cluster on which Jenkins runs to 
have relevant perms on the target GCP projects.

Before I forget,  the Jenkins jobs to build dockers push them to the Container 
Registry thats part of GKE (not DockerHub anymore :/).  This registry is in a 
central GCP project, the same project as the jenkins GKE cluster.  As part of 
application deployments Jenkins first has to set perms for the respective 
target GCP projects Service Account in order to give the taget project's GKE 
clusters access back to the docker images in a registry in the different 
central project.  You can do this by reverse figuring out the equivalent Cloud 
Storage bucket that underpins the Registry in the central project and gsutil 
setting a R perm for the relevant Service Account.

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to