Created
April 12, 2019 18:33
-
-
Save eloylp/52e89081a4905c24d2620fae37eabf30 to your computer and use it in GitHub Desktop.
Gcloud cli with docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker pull google/cloud-sdk:latest | |
docker run -ti google/cloud-sdk:latest gcloud version | |
docker run -ti --name gcloud-config google/cloud-sdk gcloud auth login | |
docker run --rm -ti --volumes-from gcloud-config google/cloud-sdk gcloud config set project <your-project-id> | |
docker run --rm -ti -v $(pwd):/src -v /var/run/docker.sock:/var/run/docker.sock:ro --volumes-from gcloud-config google/cloud-sdk bash | |
## kubernetes | |
gcloud container clusters get-credentials <your_cluster> --zone <your_zone> --project <your-project-id> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment