gke_setup_ingress_certmanager/GCP CLI_SDK Account access.md

22 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

2022-10-26 16:49:20 +00:00
# CLI/SDK Account access
This is useful to pull, edit then run the helm charts and kubectl commands without going through all the usual kubectl auth token stuff over the internet, we want to connect to the google cloud shell over ssh rather than the web console.
The project is already setup and bound to a billing account.
> https://cloud.google.com/sdk/docs/install#deb
```sh
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
sudo apt-get install apt-transport-https ca-certificates gnupg
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
sudo apt-get update && sudo apt-get install google-cloud-sdk
# generate the auth token
gcloud init --console-only
# select account toby.n.seed@gmail.com
# select project influenzanet-321116
# select region europe-west2
# select zone europe-west2-b
# the following command will generate ssh keys
gcloud cloud-shell ssh --authorize-session
```