Skip to content

marcuswelz/gitlabci-docker-git-gcloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

gitlabci-docker-git-gcloud

docker:git image with Google Cloud SDK and kubectl for Gitlab CI Runner

Usage

This is the alpine based docker:git image, with the Google Cloud SDK, kubectl, and envsubst added.

It can be used as a foundation to automate Google Cloud Container Engine deployments via gcloud and kubectl commands.

To get started, create a Service account key via Google Cloud's API Manager in the Credentials section in JSON format.

I'm storing the entire contents of the JSON file in a Gitlab Variable, which I then write out to a file.

Afterwards, authenticate to Google Cloud with:

# gcloud auth activate-service-account --key-file=your-credentials-file.json

Then, retrieve the credentials to make them available to kubectl via:

# gcloud container clusters get-credentials <your-cluster-id>

Afterwards, run whatever typical kubectl apply -f scripts, etc.

About

docker:git image with Google Cloud SDK and kubectl for Gitlab CI Runner

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •