Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To collect the metrics from the GCP services like compute, storage, pub-sub etc, we need to make following changes to gcp.yaml

...

Create Credentials File

  • In the Google Cloud console, go to Menu menu > IAM & Admin > Service Accounts. Go to Service Accounts.

  • Select your service account (or create a new one).

    • Ensure that the service account has “MONITOR VIEWER” permissions to collect GCP metrics.

  • Click Keys > Add key > Create new key.

  • Select JSON, then click Create. ...

  • Click Close.

Create Kubernetes Secret

Create a Kubernetes secret from the credentials file.

Code Block
kubectl create secret generic kfuse-sd-secret --from-file=./credentials.json

...

<credentials json file> -n kfuse

Configure Kloudfuse to start collecting metrics.

Update the helm values with the following configuration. Update the corresponding projectId of the GCP account and update the typePrefixes to collect the metrics from relevant services of GCP as described here.

Code Block
kfuse-cloud-exporter:
  prometheus-stackdriver-exporter:
    enabled: true
    stackdriver:
      enabled: false
      httpTimeout: 30s
      maxRetries: 3
      ## gcp project id
      projectId: "YOUR PROJECT ID"
      ## create this secret with access credentials to gcp account
      serviceAccountSecret: kfuse-sd-secret
      metrics:
        typePrefixes: "compute.googleapis.com"