Alibaba Cloud
Prometheus, an open-source monitoring toolkit, has been deeply integrated with Alibaba Cloud Kubernetes Service (ACK). This guide will walk you through setting up ARMS (Alibaba Cloud Realtime Monitoring Service) Prometheus in your ACK cluster using different methods.
Pre-requisites
- Kubectl Installation: Ensure you have kubectl installed on your client. If not, download and install kubectl, and perform the required installation procedure.
Procedure
You can use one of the following methods to enable ARMS Prometheus:
Enable ARMS Prometheus by setting cluster parameters
To enable ARMS Prometheus for monitoring within the Alibaba Cloud Kubernetes Service (ACK), follow these user-centered steps:
- Begin by logging into the ACK console.
- Navigate to the left-side pane and select Clusters.
- In the Clusters page, find the option to Create Kubernetes Cluster in the upper-right corner and select it.
- Choose the desired cluster template. As you set up the cluster parameters, locate the Component Configurations wizard page. Here, ensure you select Enable Prometheus Monitoring.
By default, Enable Prometheus Monitoring is selected when you create a cluster. After the cluster is created, the system automatically configures ARMS Prometheus.
To streamline the monitoring process using ARMS Prometheus within the Alibaba Cloud Kubernetes Service (ACK), follow these user-centric instructions:
- Access the ACK Console: Start by logging into the ACK console.
- Navigate to the App Catalog: In the left-side pane, navigate to Marketplace > App Catalog.
- Locate ARMS Prometheus: On the App Catalog page, switch to the Alibaba Cloud Apps tab. Here, search for and select ack-arms-prometheus.
- Choose the Cluster & Deploy: In the ack-arms-prometheus section, specify the cluster where you intend to enable ARMS Prometheus. Once selected, proceed to the Deploy section and initiate the process by selecting Create.
- Establish a Connection: Ensure you're connected to the ACK clusters using kubectl.
- Access Cluster Details: Re-enter the ACK console and navigate to Clusters using the left-side pane. Identify and select the cluster you're looking to manage either by clicking on its name or by selecting the Details option in the Actions column. This will redirect you to the detailed page of your chosen cluster.
- Gather Connection Information: Within the Cluster Information page, navigate to the Connection Information tab. Depending on your preference, choose the required cluster credentials, be it for online access or a private connection.
By default, kubectl seeks a config file located in the $HOME/.kube directory of the client. This file holds the necessary credentials for cluster authentication. Ensure that you:
- Opt between Public Access or Internal Access and copy the credentials. Store these credentials within the config file found in the $HOME/.kube directory.
- Save and close the file once done.
- Validate your connection by executing a kubectl command, ensuring you've established a successful connection to your cluster.
Accessing Prometheus: Execute the command below to route Prometheus in the cluster to your local port 9090:
arduinoCopy codekubectl port-forward svc/ack-prometheus-operator-prometheus 9090:9090 -n monitoringFinally, launch a web browser and access localhost:9090. Within the Prometheus interface, navigate to Status > Targets to view all data collection tasks. A task labeled as UP indicates its successful operation.
Activating ARMS Prometheus via the ACK Console's Prometheus Monitoring page
If you are seeking to enable ARMS Prometheus through the Prometheus Monitoring section of the ACK console, follow these user-friendly steps:
- Access the ACK Console: Begin by logging into the ACK console.
- Navigate to Clusters: From the left-side pane, select Clusters.
- Identify Desired Cluster: On the Clusters page, locate the cluster you wish to work on. Select its name or choose the Details option in the Actions column. This action will redirect you to the comprehensive details of your selected cluster.
- Access Prometheus Monitoring: Within the cluster details, navigate to the left pane and select Operations > Prometheus Monitoring.
- Initiate ARMS Prometheus: In the central part of the Prometheus Monitoring page, select Install to begin the ARMS Prometheus setup.