StreamState / terraform-k8s-configuration

1 stars 1 forks source link

helpful commands for teraform

install gcloud and kubectl for gcloud

See https://cloud.google.com/community/tutorials/managing-gcp-projects-with-terraform

First time:

Every time:

To shut down:

If anything hangs, you can delete the kubernetes module:

Make sure to delete any Compute Engine storage!!

deploy workflow

First, an admin needs to create a new application with client id and secret in your oauth provider (eg Okta). Then, use the client id and secret to make a post request to get a token.

For Okta:

upload json to bucket

You may have to create a subfolder first (eg, /test)

Read from the result firebase:

curl -H "Authorization: Bearer 7b1d331a-e67f-4ee8-b1f8-930320f18039" -X GET https://testorg.streamstate.org/api/mytestapp/features/1?filter="somevalue" -k

prometheus

Grafana password:

test workload identity

kubectl run -it \ --image google/cloud-sdk:slim \ --serviceaccount cert-manager \ --namespace serviceplane-testorg \ workload-identity-test

gcloud projects get-iam-policy streamstatetest \ --flatten="bindings[].members" \ --format='table(bindings.role)' \ --filter="bindings.members:dns-testorg@streamstatetest.iam.gserviceaccount.com"