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¶
-
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
-
Install the Percona Operator for MySQL based on Percona XtraDB Cluster:
$ helm install my-op percona/pxc-operator
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).Note
If nothing explicitly specified,
helm install
command will work withdefault
namespace. To use different namespace, provide it with the following additional parameter:--namespace my-namespace
. -
Install Percona XtraDB Cluster:
$ helm install my-db percona/pxc-db
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).
Installing Percona XtraDB Cluster with customized parameters¶
The command above installs Percona XtraDB Cluster with default parameters.
Custom options can be passed to a helm install
command as a
--set key=value[,key=value]
argument. The options passed with a chart can be
any of the Operator’s Custom Resource options.
The following example will deploy a Percona XtraDB Cluster Cluster in the
pxc
namespace, with disabled backups and 20 Gi storage:
$ helm install my-db percona/pxc-db \
--set pxc.volumeSpec.resources.requests.storage=20Gi \
--set backup.enabled=false