pxc-db
by Percona
A Helm chart for installing Percona XtraDB Cluster Databases using the PXC Operator.
About this chart
Percona XtraDB Cluster
Percona XtraDB Cluster (PXC) is a database clustering solution for MySQL. This chart deploys Percona XtraDB Cluster on Kubernetes controlled by Percona Operator for MySQL.
Useful links
Pre-requisites
-
Percona Operator for MySQL running in your Kubernetes cluster. See installation details here or in the Operator Documentation.
-
Kubernetes 1.30+
-
Helm v3
Chart Details
This chart will deploy Percona XtraDB Cluster in Kubernetes. It will create a Custom Resource, and the Operator will trigger the creation of corresponding Kubernetes primitives: StatefulSets, Pods, Secrets, etc.
Installing the Chart
To install the chart with the pxc release name using a dedicated namespace (recommended):
helm repo add percona https://percona.github.io/percona-helm-charts/
helm install my-db percona/pxc-db --version 1.20.0 --namespace my-namespace
The chart can be customized using the following configurable parameters:
| Parameter | Description | Default |
|---|---|---|
crVersion | Version of the Operator the Custom Resource belongs to | 1.20.0 |
ignoreAnnotations | Operator will not remove following annotations | [] |
ignoreLabels | Operator will not remove following labels | [] |
pause | Stop PXC Database safely | false |
enableVolumeExpansion | Deprecated. Use storageScaling.enableVolumeScaling instead. Allows to resize PersistentVolumeClaims by changing .pxc.persistence.size field. | false |
storageScaling.enableVolumeScaling | Enable volume resizing | false |
storageScaling.enableExternalAutoscaling | Enable external volume autoscaling | false |
storageScaling.autoscaling.enabled | Enable volume autoscaling | false |
storageScaling.autoscaling.triggerThresholdPercent | Percentage of disk usage that triggers automatic storage expansion | 80 |
storageScaling.autoscaling.growthStep | Amount to add to storage when the threshold is exceeded | 2Gi |
storageScaling.autoscaling.maxSize | Maximum size for PVCs. If set, autoscaling will not increase storage beyond this limit | `` |
unsafeFlags.tls | Allows users to configure a cluster without TLS/SSL certificates | false |
unsafeFlags.pxcSize | Allows users to configure a cluster with less than 3 Percona XtraDB Cluster instances | false |
unsafeFlags.proxySize | Allows users to configure a cluster with less than 2 ProxySQL or HAProxy Pods | false |
unsafeFlags.backupIfUnhealthy | Allows running a backup even if the cluster status is not ready | false |
enableCRValidationWebhook | Enables or disables schema validation before applying custom resource | false |
initContainer.image | An alternative image for the initial Operator installation | "" |
initContainer.containerSecurityContext | A custom Kubernetes Security Context for a Container to be used instead of the default | {} |
initContainer.resources.requests | Init container resource requests | {} |
initContainer.resources.limits | Init container resource limits | {} |
updateStrategy | Regulates the way how PXC Cluster Pods will be updated after setting a new image | SmartUpdate |
upgradeOptions.versionServiceEndpoint | Endpoint for actual PXC Versions provider | https://check.percona.com |
upgradeOptions.apply | PXC image to apply from version service - recommended, latest, actual version like 8.0.19-10.1 | disabled |
upgradeOptions.schedule | Cron formatted time to execute the update | "0 4 * * *" |
finalizers:percona.com/delete-pxc-pods-in-order | Set this if you want to delete PXC pods in order on cluster deletion | [] |
finalizers:percona.com/delete-proxysql-pvc | Set this if you want to delete proxysql persistent volumes on cluster deletion | [] |
finalizers:percona.com/delete-pxc-pvc | Set this if you want to delete database persistent volumes on cluster deletion | [] |
finalizers:percona.com/delete-ssl | Deletes objects created for SSL (Secret, certificate, and issuer) after the cluster deletion | [] |
annotations | PerconaXtraDBCluster custom resource annotations | {} |
tls.enabled | Enable PXC Pod communication with TLS | true |
tls.certValidityDuration | Defines how long certificates will remain valid from the moment it is issued by cert-manager | "" |
tls.caValidityDuration | Defines how long certificate authority will remain valid from the moment it is issued by cert-manager | "" |
tls.SANs | Additional domains (SAN) to be added to the TLS certificate within the extended cert-manager configuration | [] |
tls.issuerConf.name | A cert-manager issuer name | "" |
tls.issuerConf.kind | A cert-manager issuer type | "" |
tls.issuerConf.group | A cert-manager issuer group | "" |
pxc.size | PXC Cluster target member (pod) quantity. Can't even if unsafeFlags.pxcSize is true | 3 |
pxc.clusterSecretName | Specify if you want to use custom or Operator generated users secret (if the one specified doesn't exist) | `` |
pxc.image.repository | PXC Container image repository | percona/percona-xtradb-cluster |
pxc.image.tag | PXC Container image tag | 8.4.8-8.1 |
pxc.imagePullPolicy | The policy used to update images | `` |
pxc.autoRecovery | Enable full cluster crash auto recovery | true |
pxc.expose.enabled | Enable or disable exposing Percona XtraDB Cluster nodes with dedicated IP addresses | true |
pxc.expose.type | The Kubernetes Service Type used for exposure | LoadBalancer |
pxc.expose.loadBalancerClass | When pxc.expose.type set to LoadBalancer, the pxc.expose.loadBalancerClass field enables you to use a load balancer implementation other than the cloud provider default | `` |
pxc.expose.externalTrafficPolicy | Specifies whether Service for Percona XtraDB Cluster should [route external traffic to cluster-wide or to node-local endpoints](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-s |
Deploy pxc-db with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has pxc-db on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartpxc-db is pinned at v1.20.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply