Improve GKE Auto Deploy instructions

While trying to follow https://docs.gitlab.com/ee/ci/autodeploy/quick_start_guide.html, I found a number of issues with the current documentation and Auto Deploy script:

  • GKE no longer has a "Secrets" tab in the Google Cloud UI: https://docs.gitlab.com/ee/ci/autodeploy/quick_start_guide.html#copy-credentials-to-gitlab-com-project

  • Due to missing line breaks, you can't copy and paste the CA certificate in GitLab's UI and have it work:

    image

    I ended up running gcloud get credentials, looking in my .kube/config, pulling out the base64-encoded certificate-authority-data, and then using the decoded format that way.

  • The service token isn't available in the Google Cloud UI. You can only get this via kubectl describe secrets now. We need to add documentation for that.

  • What is the service token used for? I see no explanation why it's necessary or how to verify that it's correct.

  • There's no way to test the Kubernetes integration to make sure the settings are correct.

  • I had to precreate a Kubernetes namespace:

    $ kubectl create -f nginx-deployment.yaml || kubectl replace -f nginx-deployment.yaml
    Error from server (NotFound): error when creating "nginx-deployment.yaml": namespaces "kube-test-147" not found
    Error from server (NotFound): error when replacing "nginx-deployment.yaml": namespaces "kube-test-147" not found

/cc: @markpundsack, @ayufan, @bikebilly

Edited by Stan Hu