If deploy with filename on GKE, Supported builder images provided by Cloud Build can be found from official.
Also can found full list.
But both gke-deploy
or kubectl
can't suite my requirement. I want to run a command like
kustomize build ./overlays/production | kubectl apply -f -
Because I need to build a whole file with kustomize first, then use kubectl.
From Running inline bash scripts, I can try
steps:
...
- name: gcr.io/cloud-builders/gcloud
entrypoint: bash
args:
- kustomize
- build
- ./overlays/production
- |
- kubectl
- apply
- -f
- -
But I think it can't find which cluster on GKE to use. So how to use it in this case with Cloud Build instead of run it on local shell?