-
Notifications
You must be signed in to change notification settings - Fork 21
Added kustomize to gke method #49
base: master
Are you sure you want to change the base?
Conversation
… be consistent, updated deployment images
| # update images in k8s config to point to project's container registry | ||
| kustomize edit set image USER-REPO/web=gcr.io/$PROJECT_ID/web:latest | ||
| kustomize edit set image USER-REPO/mysql=gcr.io/$PROJECT_ID/mysql:latest | ||
| # save output to _config.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! One question (note that I'm not very familiar with kustomize): is it possible to overwrite the configs in place? If we could do that, we wouldn't have to save a new file. Not a big deal of course but it would be a little cleaner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not as far as I can tell unfortunately. kustomize buildcan be used in a couple ways:
kustomize build . : prints output
kustomize build . > temp.yaml : save output to temp
kustomize build . | kubectl apply -f - apply output
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kustomize cloud builder has kubectl but I think it would make it harder to follow because it would require some extra env variables or gcloud get-credentials command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flipping the script! I just learned that kubectl now has kustomize built-in. If I read this correctly, we can patch the config and deploy the app in one command. I haven't tried it yet, though, and IDK if cloud-builders has a new enough version of kubectl for this to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! will look into it, there might be a version issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cloud-builders uses kubectl gcloud component which is 1.11
https://cloud.google.com/sdk/docs/release-notes
Google Kubernetes Engine kubectl is updated to 1.11.9. Addresses security vulnerability: CVE-2019-1002101.
https://github.com/GoogleCloudPlatform/cloud-builders/blob/master/kubectl/Dockerfile
RUN /builder/google-cloud-sdk/bin/gcloud -q components install kubectl
Fixes issue #48
USER-REPOkustomize buildstep to gke method configClean up
service-web.yamltoweb-service.yaml