GCP Cloud
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.
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 is 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.