github.com/GoogleContainerTools/skaffold@v1.39.18/examples/kaniko/README.md (about)

     1  ### Example: kaniko
     2  
     3  [![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.svg)](https://ssh.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/GoogleContainerTools/skaffold&cloudshell_open_in_editor=README.md&cloudshell_workspace=examples/kaniko)
     4  
     5  This is an example demonstrating:
     6  
     7  * **building** a single Go file app and with a single stage `Dockerfile` using [kaniko](https://github.com/GoogleContainerTools/kaniko) to build on a K8S cluster
     8  * **tagging** using the default tagPolicy (`gitCommit`)
     9  * **deploying** a single container pod using `kubectl`
    10  
    11  ### GCP
    12  
    13  If you are on GCP, create a [Service Account](https://cloud.google.com/iam/docs/understanding-service-accounts) for Kaniko that has permissions to pull and push images from/to `gcr.io`.
    14  
    15  Download the json service account file, rename the file to `kaniko-secret` (do not append .json to the filename) and create a Kubernetes secret using the following example:
    16  
    17  ```
    18  kubectl create secret generic kaniko-secret --from-file=kaniko-secret
    19  ```
    20  
    21  Note the name of the secret *AND* the key must be `kaniko-secret`