-
Notifications
You must be signed in to change notification settings - Fork 10
Kubernetes (GKE) Development HOWTO
Joel Thibault edited this page Jul 17, 2023
·
9 revisions
It's right there in the name - GKE apps are powered by GKE (Google Kubernetes Engine) - but how do we access this system for development, debugging, troubleshooting, etc?
- Login to Terra (Dev is https://bvdp-saturn-dev.appspot.com/)
- Create Workspace and note your Google Project ID
- Create a GKE App within the workspace by running the following command:
gcloud auth login <your terra user>
curl --location 'https://leonardo.dsde-dev.broadinstitute.org/api/google/v1/apps/<google project>/<choose a name>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <BEARER_TOKEN>' \
--data '{
"diskConfig": {
"name": "<NAME_OF_DISK, leave empty to create a disk>"
},
"appType": "RSTUDIO",
"labels": {"all-of-us": "true"}
}'
- Navigate to your workspace within Terra, and copy the
Google Project ID
from within theCloud Information
panel of your workspace's dashboard. - Navigate to the Google Cloud Console, and login with an account that has access to the Terra environment that you are working in.
- Click into the project dropdown and paste the
Google Project ID
within the search bar, and then select your project. - Navigate to
Kubernetes Engine
- Click on the Kubernetes cluster that you would like to work with
- Click on the
CONNECT
panel at the top of the page. - Copy the command under
Command-line access
- Checkout the terra app repository
- Open a terminal and with
gcloud auth list
ensure that you are logged in to gcloud with the account that you used earlier to log into Google Cloud Console. - Ensure that you have
gke-gcloud-auth-plugin
installed by runninggcloud components install gke-gcloud-auth-plugin
and thengcloud components update
- Then, from within Google Cloud Console, navigate to the IAM page, and copy the name of the service account with the editor role.
At this point, congratulations, and you have a GKE cluster ready to be used!
- Note: this process appears to require access to the Broad VPN. TODO: why?
- If
helm
is not yet installed, Homebrew is one way to do on Mac:brew install helm
- From there, in your terminal navigate to the root of the terra-app repository that you checked out and run:
helm install --set serviceAccount.annotations.gcpServiceAccount="<NAME_OF_SERVICE_ACCOUNT_FROM_PREVIOUS_STEP>" \
aou-sas-setup ./terra-app-setup-chart
- TODO: fill in more details
- Install an app (eg sas chart), run
helm install aou-sas-chart-rls-1 aou-sas-chart --namespace <namespace> --values aou-sas-chart/test_values.yaml