Cloud Services

Container Cluster Management

GCP Cloud
Published On Dec 12, 2024 - 2:12 PM

GCP Cloud

Understand how to enable Prometheus on Google Cloud Platform, supporting your chosen monitoring system.
Harness the power of Prometheus within the Google Cloud Platform. By following these user-centric steps, you can easily monitor your cloud infrastructure's performance and health. Let's get started!
Prerequisites
  • Ensure you have
    helm
    installed on your system.
Setting Up the Environment
  • Start by adding the public Kubernetes chart repository to your Helm configuration with:
    helm repo add stable https://kubernetes-charts.storage.googleapis.com
    .
  • Considering organization and ease of management, let's create a separate namespace named 'monitoring' for Prometheus:
    kubectl create ns monitoring
    .
  • With the namespace ready, it's time to deploy the Prometheus Operator chart:
    helm install prometheus stable/prometheus-operator --namespace monitoring
    .
  • To confirm everything's in place, execute the following command:
    kubectl --namespace monitoring get pods -l "release=prometheus"
    .
Prometheus Dashboard
With Prometheus now up and running, it's time to dive into its comprehensive dashboard:
  • Use the Kubernetes proxy to access the Prometheus dashboard securely. This method ensures you're tunneling your connection securely through the Kubernetes API server with the following command:
    kubectl port-forward -n monitoring prometheus-prometheus-prometheus-oper-prometheus-0 9090
    .
  • Once a secure connection is established, you can access the dashboard.
Do you have two minutes for a quick survey?
Take Survey