Skip to content

Instantly share code, notes, and snippets.

@GitHub30
Last active June 2, 2022 10:14
Show Gist options
  • Save GitHub30/337a58a4332f815876de4a82e9bd34f5 to your computer and use it in GitHub Desktop.
Save GitHub30/337a58a4332f815876de4a82e9bd34f5 to your computer and use it in GitHub Desktop.
GSP364: Monitor Environments with Managed Service for Prometheus: Challenge Lab
gcloud container clusters create gmp-cluster --num-nodes=3 --zone=us-central1-c
gcloud container clusters get-credentials gmp-cluster --zone=us-central1-c
kubectl create ns gmp-test
kubectl -n gmp-test apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/prometheus-engine/v0.2.3/examples/example-app.yaml
kubectl -n gmp-public edit operatorconfig config
wget https://gist.github.com/GitHub30/337a58a4332f815876de4a82e9bd34f5/raw/d7f9e34dcbb27a86ac96b62aa785e82609f915ff/op-config.yaml
export PROJECT=$(gcloud config get-value project)
gsutil mb -p $PROJECT gs://$PROJECT
gsutil cp op-config.yaml gs://$PROJECT
gsutil -m acl set -R -a public-read gs://$PROJECT
collection:
filter:
matchOneOf:
- '{job="prom-example"}'
- '{__name__=~"job:.+"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment