Skip to content

Install Percona XtraDB Cluster using Helm

Helm is the package manager for Kubernetes. Percona Helm charts can be found in percona/percona-helm-charts repository on Github.

Pre-requisites

  1. The Helm package manager. Install it following the official installation instructions .

    Note

    Helm v3 is needed to run the following steps.

  2. The kubectl tool to manage and deploy applications on Kubernetes. Install it following the official installation instructions .

Installation

Here’s a sequence of steps to follow:

  1. Add the Percona’s Helm charts repository and make your Helm client up to date with it:

    $ helm repo add percona https://percona.github.io/percona-helm-charts/
    $ helm repo update
    
  2. It is a good practice to isolate workloads in Kubernetes via namespaces. Create a namespace:

    $ kubectl create namespace <namespace>
    
  3. Install the Percona Operator for MySQL based on Percona XtraDB Cluster:

    $ helm install my-op percona/pxc-operator --namespace <namespace>
    

    The namespace is the name of your namespace. The my-op parameter in the above example is the name of a new release object which is created for the Operator when you install its Helm chart (use any name you like).

  4. Install Percona XtraDB Cluster:

    $ helm install my-db percona/pxc-db --namespace <namespace>
    

    The my-db parameter in the above example is the name of a new release object which is created for the Percona XtraDB Cluster when you install its Helm chart (use any name you like).

  5. Check the Operator and the Percona XtraDB Cluster Pods status.

    $ kubectl get pxc -n <namespace>
    

    The creation process may take some time. When the process is over your cluster obtains the ready status.

    Expected output
    NAME       ENDPOINT                   STATUS   PXC   PROXYSQL   HAPROXY   AGE
    cluster1   cluster1-haproxy.default   ready    3                3         33d
    

You have successfully installed and deployed the Operator with default parameters.

This deploys default Percona XtraDB Cluster configuration with three HAProxy and three XtraDB Cluster instances.

You can check the rest of the Operator’s parameters in the Custom Resource options reference.

Next steps

Connect to Percona XtraDB Cluster

Install Percona XtraDB Cluster with customized parameters

Get expert help

If you need assistance, visit the community forum for comprehensive and free database knowledge, or contact our Percona Database Experts for professional support and services. Join K8S Squad to benefit from early access to features and “ask me anything” sessions with the Experts.


Last update: 2024-10-29