garkai heavenlea jaynee

0 views
Skip to first unread message

Nayra Waddles

unread,
Aug 4, 2024, 4:34:02 AM8/4/24
to unstocaddi
```html

How to Install Percona Monitoring and Management on Google Container Engine (Kubernetes)

Percona Monitoring and Management (PMM) is a free and open-source platform for managing and monitoring MySQL, MongoDB, and PostgreSQL performance. It provides a comprehensive set of tools for collecting, analyzing, and visualizing metrics from your databases and servers.

Google Container Engine (GKE) is a managed service for running Kubernetes clusters on Google Cloud Platform. Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications.

In this article, we will show you how to install PMM on GKE using Helm, a package manager for Kubernetes. Helm simplifies the installation and configuration of PMM by providing pre-defined charts that contain all the necessary resources and settings.

Prerequisites

Before you begin, you need to have the following:

    • A Google Cloud Platform account and a project with billing enabled.
    • A GKE cluster with at least three nodes and 4 GB of memory each.
    • The gcloud command-line tool installed and configured with your project and cluster.
    • The kubectl command-line tool installed and configured with your cluster.
    • The helm command-line tool installed and initialized with your cluster.

    Step 1: Add the Percona Helm repository

    The first step is to add the Percona Helm repository to your helm client. This will allow you to access the PMM chart and its dependencies. To do this, run the following command:

    ```bash
    ```

    You should see a message like this:

    ```bash
    "percona" has been added to your repositories
    ```

    Step 2: Install the PMM chart

    The next step is to install the PMM chart using helm. This will create a namespace called pmm and deploy all the required resources for PMM, such as deployments, services, persistent volume claims, secrets, etc. To do this, run the following command:

    ```bash
    helm install pmm percona/pmm-server --version 2.23.0 --set platform=kubernetes
    ```

    You should see a message like this:

    ```bash
    NAME: pmm
    LAST DEPLOYED: Wed Apr 19 04:15:14 2023
    NAMESPACE: pmm
    STATUS: deployed
    REVISION: 1
    NOTES:
    Percona Monitoring and Management (PMM) has been installed!
    To access PMM Server web interface:
    1. Get the PMM Server URL by running these commands in the same shell:
    export POD_NAME=$(kubectl get pods --namespace pmm -l "app.kubernetes.io/name=pmm-server" -o jsonpath=".items[0].metadata.name")
    echo "Visit 127.0.0.1:8080/graph/ to use PMM Server"
    kubectl --namespace pmm port-forward $POD_NAME 8080:80
    2. Open 127.0.0.1:8080/graph/ in your browser.
    To add MySQL or MongoDB instances to PMM Server:
    1. Install PMM Client on each database host that you want to monitor.
    2. Run 'pmm-admin config' command with --server-url flag to configure PMM Client.
    3. Run 'pmm-admin add' command with appropriate flags to add MySQL or MongoDB service.
    For more information on how to use PMM, please refer to the documentation:
    ```

    Step 3: Access the PMM web interface

    The final step is to access the PMM web interface using your browser. As shown in the previous message, you need to run some commands in your terminal to get the PMM Server URL and forward the port from your cluster to your local machine. To do this, run the following commands:

    ```bash
    export POD_NAME=$(kubectl get pods --namespace pmm -l "app.kubernetes.io/name=pmm-server" -o jsonpath=".items[0].metadata.name")
    echo "Visit 127.0.0.1:8080/graph/ to use PMM Server"
    kubectl --namespace 51082c0ec5
    Reply all
    Reply to author
    Forward
    0 new messages