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¶
-
The Helm package manager. Install it following the official installation instructions .
Note
Helm v3 is needed to run the following steps.
-
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:
-
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
-
It is a good practice to isolate workloads in Kubernetes via namespaces. Create a namespace:
$ kubectl create namespace <namespace>
-
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. Themy-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). -
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). -
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 find in the documentation for the charts, which Operator and database parameters can be customized during installation. Also you can check the rest of the Operator’s parameters in the Custom Resource options reference.
Next steps¶
Connect to Percona XtraDB Cluster
Useful links¶
Install Percona XtraDB Cluster with customized parameters