Sign inSign up

kriasoft/gcloud

By kriasoft

•Updated almost 9 years ago

Google Cloud SDK bundled with Kubernetes CLI

Image
0

1.3K

kriasoft/gcloud repository overview

⁠Google Cloud SDK

Google Cloud SDK⁠ bundled with Kubernetes CLI⁠ (kubectl).

⁠Usage Example

To use this image, pull it from Docker Hub⁠ by running:

docker pull kriasoft/gcloud:latest

Verify the image:

docker run -it kriasoft/gcloud:latest gcloud version
docker run -it kriasoft/gcloud:latest kubectl version

or, user a particular version number:

docker run -it kriasoft/gcloud:181.0.0 gcloud version
docker run -it kriasoft/gcloud:181.0.0 kubectl version

Then, authenticate by running:

docker run -it \
  --volume "$PWD/gcp-key.json:/root/gcp-key.json"
  --name gcloud-config \
  kriasoft/gcloud:latest \
  sh -c '
    gcloud auth activate-service-account --key-file /root/gcp-key.json
    gcloud --quiet config configurations activate $PROJECT || gcloud config configurations create $PROJECT --activate
    gcloud --quiet config set project $PROJECT
    gcloud --quiet config set compute/region europe-west1
    gcloud --quiet config set compute/zone europe-west1-b
  '

To list compute instances using these credentials, run the container with:

docker run --rm -it \
  --volumes-from gcloud-config \
  kriasoft/gcloud \
  gcloud compute instances list --project <your-project>

Tag summary

Content type

Image

Digest

Size

140.2 MB

Last updated

almost 9 years ago

docker pull kriasoft/gcloud