Using Percona Kubernetes Operators with Percona Monitoring and Management

Using Percona Kubernetes Operators with Percona Monitoring and ManagementPercona Monitoring and Management (PMM) provides an excellent solution to monitor both Percona XtraDB Cluster and Percona Server for MongoDB. Currently, there is no Percona-supported deployment model to deploy PMM by Percona Kubernetes Operators. Still, you can try the following experimental approach to use PMM in Kubernetes or OpenShift environment together with the operators for Percona XtraDB Cluster or Percona Server for MongoDB.

Installing the PMM Server

This first thing to do is to install the PMM Server to monitor Percona Server for MongoDB or Percona XtraDB Cluster on Kubernetes or OpenShift. The following three steps are optional if you already have installed the PMM Server. The PMM Server available on your network does not require another installation in Kubernetes!

1. The recommended installation approach is based on using helm – the package manager for Kubernetes, which will substantially simplify further steps. Install helm following its official installation instructions.

2. Using helm, add the Percona chart repository and update the information for the available charts as follows:

3. Use helm to install PMM Server:

OpenShift command:

Kubernetes command:

Installing the PMM Client

The following steps are needed for the PMM client installation:

1. The PMM client installation is initiated by updating the pmm section in the deploy/cr.yaml file.

  • Set pmm.enabled=true.
  • Ensure the serverHost (the PMM service name is monitoring-service by default) is the same as the value specified for the name parameter on the previous step, but with an additional -service suffix.
  • Make sure that PMM user name and password are correct.

In case of the Operator for Percona Server for MongoDB:

  • PMM_SERVER_USER key in the deploy/secrets.yaml secrets file should be a based64 encoded equivalent of the PMM Server user name (pmm by default for PMM 1.x and admin for PMM 2.x).
  • PMM_SERVER_PASSWORD key in the deploy/secrets.yaml secrets file should be a base64 encoded equivalent of the value specified for the credentials.password parameter on the last PMM Server installation step.

In case of the Operator for Percona XtraDB Cluster:

    • serverUser key in the deploy/cr.yaml configuration file should match the PMM Server user name (pmm by default for PMM 1.x and admin for PMM 2.x).
    • pmmserver key in the deploy/secrets.yaml secrets file is a base64 encoded equivalent of the value specified for the credentials.password parameter on the last PMM Server installation step.

Apply changes with the kubectl apply -f deploy/secrets.yaml command, if needed.

When done, apply the edited deploy/cr.yaml file:

2. Check that correspondent Pods are not in a cycle of stopping and restarting. This cycle occurs if there are errors in the previous steps:

3. Run the following command:

In the results, locate the the EXTERNAL-IP field. This external IP address can be used to access PMM via https in a web browser, with the login/password authentication, and the PMM Server is already configured to show either Percona Server for MongoDB metrics or Percona XtraDB Cluster metrics, depending on the Operator with which these steps were applied.

Share this post

Leave a Reply