Skip to content
logo
Percona Operator for MySQL
Custom Resource options
Initializing search
    percona/k8spxc-docs
    percona/k8spxc-docs
    • Welcome
      • System Requirements
      • Design and architecture
      • Comparison with other solutions
      • Install with Helm
      • Install with kubectl
      • Install on Minikube
      • Install on Google Kubernetes Engine (GKE)
      • Install on Amazon Elastic Kubernetes Service (AWS EKS)
      • Install on Microsoft Azure Kubernetes Service (AKS)
      • Install on OpenShift
      • Generic Kubernetes installation
      • Multi-cluster and multi-region deployment
      • Application and system users
      • Changing MySQL Options
      • Anti-affinity and tolerations
      • Labels and annotations
      • Local Storage support
      • Defining environment variables
      • Load Balancing with HAProxy
      • Load Balancing with ProxySQL
      • Transport Encryption (TLS/SSL)
      • Data at rest encryption
      • Telemetry
      • Backup and restore
      • Upgrade Database and Operator
      • Horizontal and vertical scaling
      • Monitor with Percona Monitoring and Management (PMM)
      • Add sidecar containers
      • Restart or pause the cluster
      • Crash recovery
      • Debug and troubleshoot
      • How to install Percona XtraDB Cluster in multi-namespace (cluster-wide) mode
      • How to upgrade Percona XtraDB Cluster manually
      • How to use private registry
      • Custom Resource options
        • PerconaXtraDBCluster Custom Resource options
          • Extended cert-manager configuration section
          • Upgrade options section
          • PXC section
          • HAProxy section
          • ProxySQL section
          • Log Collector section
          • PMM section
          • Backup section
        • PerconaXtraDBClusterRestore Custom Resource options
          • backupSource section
          • backupSource.s3 subsection
          • backupSource.azure subsection
          • pitr subsection
      • Percona certified images
      • Operator API
      • Frequently Asked Questions
      • Old releases (documentation archive)
      • Release notes index
      • Percona Operator for MySQL based on Percona XtraDB Cluster 1.12.0 (2022-12-07)
      • Percona Operator for MySQL based on Percona XtraDB Cluster 1.11.0 (2022-06-03)
      • Percona Distribution for MySQL Operator 1.10.0 (2021-11-24)
      • Percona Distribution for MySQL Operator 1.9.0 (2021-08-09)
      • Percona Kubernetes Operator for Percona XtraDB Cluster 1.8.0 (2021-05-26)
      • Percona Kubernetes Operator for Percona XtraDB Cluster 1.7.0 (2021-02-02)
      • Percona Kubernetes Operator for Percona XtraDB Cluster 1.6.0 (2020-09-09)
      • Percona Kubernetes Operator for Percona XtraDB Cluster 1.5.0 (2020-07-21)
      • Percona Kubernetes Operator for Percona XtraDB Cluster 1.4.0 (2020-04-29)
      • Percona Kubernetes Operator for Percona XtraDB Cluster 1.3.0 (2020-01-06)
      • Percona Kubernetes Operator for Percona XtraDB Cluster 1.2.0 (2019-09-20)
      • Percona Kubernetes Operator for Percona XtraDB Cluster 1.1.0 (2019-07-15)
      • Percona Kubernetes Operator for Percona XtraDB Cluster 1.0.0 (2019-05-29)

    • PerconaXtraDBCluster Custom Resource options
      • Extended cert-manager configuration section
      • Upgrade options section
      • PXC section
      • HAProxy section
      • ProxySQL section
      • Log Collector section
      • PMM section
      • Backup section
    • PerconaXtraDBClusterRestore Custom Resource options
      • backupSource section
      • backupSource.s3 subsection
      • backupSource.azure subsection
      • pitr subsection

    Custom Resource options reference¶

    Percona Operator for MySQL uses Custom Resources to manage options for the various components of the cluster.

    • PerconaXtraDBCluster Custom Resource with Percona XtraDB Cluster options,
    • PerconaXtraDBClusterBackup and PerconaXtraDBClusterRestore Custom Resources contain options for Percona XtraBackup used to backup Percona XtraDB Cluster and to restore it from backups.

    PerconaXtraDBCluster Custom Resource options¶

    PerconaXtraDBCluster Custom Resource contains options for Percona XtraDB Cluster and can be configured via the deploy/cr.yaml configuration file.

    The metadata part contains the following keys:

    • name (cluster1 by default) sets the name of your Percona XtraDB Cluster; it should include only URL-compatible characters, not exceed 22 characters, start with an alphabetic character, and end with an alphanumeric character;

    • finalizers.delete-pods-in-order if present, activates the Finalizer which controls the proper Pods deletion order in case of the cluster deletion event (on by default).

    • finalizers.delete-pxc-pvc if present, activates the Finalizer which deletes Persistent Volume Claims for Percona XtraDB Cluster Pods after the cluster deletion event (off by default).

    • finalizers.delete-proxysql-pvc if present, activates the Finalizer which deletes Persistent Volume Claim for ProxySQL Pod after the cluster deletion event (off by default).

    • finalizers.delete-ssl if present, activates the Finalizer which deletes objects, created for SSL (Secret, certificate, and issuer) after the cluster deletion event (off by default).

    The spec part of the deploy/cr.yaml contains the following sections:

    Key Value type Default Description
    upgradeOptions subdoc Percona XtraDB Cluster upgrade options section
    pxc subdoc Percona XtraDB Cluster general section
    haproxy subdoc HAProxy section
    proxysql subdoc ProxySQL section
    pmm subdoc Percona Monitoring and Management section
    backup subdoc Percona XtraDB Cluster backups section
    allowUnsafeConfigurations boolean false Prevents users from configuring a cluster with unsafe parameters such as starting the cluster with the number of Percona XtraDB Cluster instances which is less than 3, more than 5, or is an even number, with less than 2 ProxySQL or HAProxy Pods, or without TLS/SSL certificates (if false, unsafe parameters will be automatically changed to safe defaults)
    enableCRValidationWebhook boolean true Enables or disables schema validation before applying cr.yaml file (works only in cluster-wide mode due to access restrictions)
    pause boolean false Pause/resume: setting it to true gracefully stops the cluster, and setting it to false after shut down starts the cluster back
    secretsName string cluster1-secrets A name for users secrets
    crVersion string 1.12.0 Version of the Operator the Custom Resource belongs to
    ignoreAnnotations subdoc iam.amazonaws.com/role The list of annotations to be ignored by the Operator
    ignoreLabels subdoc rack The list of labels to be ignored by the Operator
    vaultSecretName string keyring-secret-vault A secret for the HashiCorp Vault to carry on Data at Rest Encryption
    sslSecretName string cluster1-ssl A secret with TLS certificate generated for external communications, see Transport Layer Security (TLS) for details
    sslInternalSecretName string cluster1-ssl-internal A secret with TLS certificate generated for internal communications, see Transport Layer Security (TLS) for details
    logCollectorSecretName string my-log-collector-secrets A secret for the Fluent Bit Log Collector
    initImage string percona/percona-xtradb-cluster-operator:1.12.0 An alternative image for the initial Operator installation
    tls subdoc Extended cert-manager configuration section
    updateStrategy string SmartUpdate A strategy the Operator uses for upgrades

    Extended cert-manager configuration section¶

    The tls section in the deploy/cr.yaml file contains various configuration options for additional customization of the TLS cert-manager.

    Key tls.SANs
    Value subdoc
    Example
    Description Additional domains (SAN) to be added to the TLS certificate within the extended cert-manager configuration
    Key tls.issuerConf.name
    Value string
    Example special-selfsigned-issuer
    Description A cert-manager issuer name
    Key tls.issuerConf.kind
    Value string
    Example ClusterIssuer
    Description A cert-manager issuer type
    Key tls.issuerConf.group
    Value string
    Example cert-manager.io
    Description A cert-manager issuer group. Should be cert-manager.io for built-in cert-manager certificate issuers

    Upgrade options section¶

    The upgradeOptions section in the deploy/cr.yaml file contains various configuration options to control Percona XtraDB Cluster upgrades.

    Key upgradeOptions.versionServiceEndpoint
    Value string
    Example https://check.percona.com
    Description The Version Service URL used to check versions compatibility for upgrade
    Key upgradeOptions.apply
    Value string
    Example Disabled
    Description Specifies how updates are processed by the Operator. Never or Disabled will completely disable automatic upgrades, otherwise it can be set to Latest or Recommended or to a specific version string of Percona XtraDB Cluster (e.g. 8.0.19-10.1) that is wished to be version-locked (so that the user can control the version running, but use automatic upgrades to move between them)
    Key upgradeOptions.schedule
    Value string
    Example 0 2 \* \* \*
    Description Scheduled time to check for updates, specified in the crontab format

    PXC section¶

    The pxc section in the deploy/cr.yaml file contains general configuration options for the Percona XtraDB Cluster.

    Key pxc.size
    Value int
    Example 3
    Description The size of the Percona XtraDB cluster must be 3 or 5 for High Availability. other values are allowed if the spec.allowUnsafeConfigurations key is set to true
    Key pxc.image
    Value string
    Example percona/percona-xtradb-cluster:8.0.29-21.1
    Description The Docker image of the Percona cluster used (actual image names for Percona XtraDB Cluster 8.0 and Percona XtraDB Cluster 5.7 can be found in the list of certified images)
    Key pxc.autoRecovery
    Value boolean
    Example true
    Description Turns Automatic Crash Recovery on or off
    Key pxc.expose.enabled
    Value boolean
    Example true
    Description Enable or disable exposing Percona XtraDB Cluster nodes with dedicated IP addresses
    Key pxc.expose.type
    Value string
    Example LoadBalancer
    Description The Kubernetes Service Type used for xposure
    Key pxc.expose.trafficPolicy
    Value string
    Example Local
    Description Specifies whether Service should route external traffic to cluster-wide or node-local endpoints (it can influence the load balancing effectiveness)
    Key pxc.expose.loadBalancerSourceRanges
    Value string
    Example 10.0.0.0/8
    Description The range of client IP addresses from which the load balancer should be reachable (if not set, there is no limitations)
    Key pxc.expose.annotations
    Value string
    Example networking.gke.io/load-balancer-type: "Internal"
    Description The Kubernetes annotations
    Key pxc.replicationChannels.name
    Value string
    Example pxc1_to_pxc2
    Description Name of the replication channel for cross-site replication
    Key pxc.replicationChannels.isSource
    Value boolean
    Example false
    Description Should the cluster act as Source (true) or Replica (false)
    in cross-site replication
    Key pxc.replicationChannels.configuration.sourceRetryCount
    Value int
    Example 3
    Description Number of retries Replica should do when the existing connection source fails
    Key pxc.replicationChannels.configuration.sourceConnectRetry
    Value int
    Example 60
    Description The interval between reconnection attempts in seconds to be used by Replica when the the existing connection source fails
    Key pxc.replicationChannels.configuration.ssl
    Value boolean
    Example false
    Description Turns SSL for replication channels on or off
    Key pxc.replicationChannels.configuration.sslSkipVerify
    Value boolean
    Example true
    Description Turns the host name identity verification for SSL-based replication on or off
    Key pxc.replicationChannels.configuration.ca
    Value string
    Example /etc/mysql/ssl/ca.crt
    Description The path name of the Certificate Authority (CA) certificate file to be used if the SSL for replication channels is turned on
    Key pxc.replicationChannels.sourcesList.host
    Value string
    Example 10.95.251.101
    Description For the cross-site replication Replica cluster, this key should contain the hostname or IP address of the Source cluster
    Key pxc.replicationChannels.sourcesList.port
    Value int
    Example 3306
    Description For the cross-site replication Replica cluster, this key should contain the Source port number
    Key pxc.replicationChannels.sourcesList.weight
    Value int
    Example 100
    Description For the cross-site replication Replica cluster, this key should contain the Source cluster weight (varies from 1 to 100, the cluster with the higher number will be selected as the replication source first)
    Key pxc.readinessDelaySec
    Value int
    Example 15
    Description Adds a delay before a run check to verify the application is ready to process traffic
    Key pxc.livenessDelaySec
    Value int
    Example 300
    Description Adds a delay before the run check ensures the application is healthy and capable of processing requests
    Key pxc.configuration
    Value string
    Example
    |
    [mysqld]
    wsrep_debug=ON
    wsrep-provider_options=gcache.size=1G;gcache.recover=yes
    Description The my.cnf file options to be passed to Percona XtraDB cluster nodes
    Key pxc.imagePullSecrets.name
    Value string
    Example private-registry-credentials
    Description The Kubernetes ImagePullSecret
    Key pxc.priorityClassName
    Value string
    Example high-priority
    Description The Kubernetes Pod priority class
    Key pxc.schedulerName
    Value string
    Example mycustom-scheduler
    Description The Kubernetes Scheduler
    Key pxc.annotations
    Value label
    Example iam.amazonaws.com/role: role-arn
    Description The Kubernetes annotations
    Key pxc.labels
    Value label
    Example rack: rack-22
    Description Labels are key-value pairs attached to objects
    Key pxc.readinessProbes.initialDelaySeconds
    Value int
    Example 15
    Description Number of seconds to wait before performing the first readiness probe
    Key pxc.readinessProbes.timeoutSeconds
    Value int
    Example 15
    Description Number of seconds after the container has started before readiness probes are initiated
    Key pxc.readinessProbes.periodSeconds
    Value int
    Example 30
    Description How often (in seconds) to perform the readiness probe
    Key pxc.readinessProbes.successThreshold
    Value int
    Example 1
    Description Minimum consecutive successes for the readiness probe to be considered successful after having failed
    Key pxc.readinessProbes.failureThreshold
    Value int
    Example 5
    Description When the readiness probe fails, Kubernetes will try this number of times before marking the Pod Unready
    Key pxc.livenessProbes.initialDelaySeconds
    Value int
    Example 300
    Description Number of seconds to wait before performing the first liveness probe
    Key pxc.livenessProbes.timeoutSeconds
    Value int
    Example 5
    Description Number of seconds after the container has started before liveness probes are initiated
    Key pxc.livenessProbes.periodSeconds
    Value int
    Example 10
    Description How often (in seconds) to perform the liveness probe
    Key pxc.livenessProbes.successThreshold
    Value int
    Example 1
    Description Minimum consecutive successes for the liveness probe to be considered successful after having failed
    Key pxc.livenessProbes.failureThreshold
    Value int
    Example 3
    Description When the liveness probe fails, Kubernetes will try this number of times before restarting the container
    Key pxc.envVarsSecret
    Value string
    Example my-env-var-secrets
    Description A secret with environment variables, see Define environment variables for details
    Key pxc.resources.requests.memory
    Value string
    Example 1G
    Description The Kubernetes memory requests for a Percona XtraDB Cluster container
    Key pxc.resources.requests.cpu
    Value string
    Example 600m
    Description Kubernetes CPU requests for a Percona XtraDB Cluster container
    Key pxc.resources.requests.ephemeral-storage
    Value string
    Example 1G
    Description Kubernetes Ephemeral Storage requests for a Percona XtraDB Cluster container
    Key pxc.resources.limits.memory
    Value string
    Example 1G
    Description Kubernetes memory limits for a Percona XtraDB Cluster container
    Key pxc.resources.limits.cpu
    Value string
    Example 1
    Description Kubernetes CPU limits for a Percona XtraDB Cluster container
    Key pxc.resources.limits.ephemeral-storage
    Value string
    Example 1G
    Description Kubernetes Ephemeral Storage limits for a Percona XtraDB Cluster container
    Key pxc.nodeSelector
    Value label
    Example disktype: ssd
    Description Kubernetes nodeSelector
    Key pxc.affinity.topologyKey
    Value string
    Example kubernetes.io/hostname
    Description The Operator topology key node anti-affinity constraint
    Key pxc.affinity.advanced
    Value subdoc
    Example
    Description In cases where the Pods require complex tuning the advanced option turns off the topologyKey effect. This setting allows the standard Kubernetes affinity constraints of any complexity to be used
    Key pxc.tolerations
    Value subdoc
    Example node.alpha.kubernetes.io/unreachable
    Description Kubernetes Pod tolerations
    Key pxc.podDisruptionBudget.maxUnavailable
    Example 1
    Description The Kubernetes podDisruptionBudget specifies the number of Pods from the set unavailable after the eviction
    Key pxc.podDisruptionBudget.minAvailable
    Value int
    Example 0
    Description The Kubernetes podDisruptionBudget Pods that must be available after an eviction
    Key pxc.volumeSpec.emptyDir
    Value string
    Example {}
    Description The Kubernetes emptyDir volume The directory created on a node and accessible to the Percona XtraDB Cluster Pod containers
    Key pxc.volumeSpec.hostPath.path
    Value string
    Example /data
    Description Kubernetes hostPath The volume that mounts a directory from the host node’s filesystem into your Pod. The path property is required
    Key pxc.volumeSpec.hostPath.type
    Value string
    Example Directory
    Description The Kubernetes hostPath. An optional property for the hostPath
    Key pxc.volumeSpec.persistentVolumeClaim.storageClassName
    Value string
    Example standard
    Description Set the Kubernetes storage class to use with the Percona XtraDB Cluster PersistentVolumeClaim
    Key pxc.volumeSpec.persistentVolumeClaim.accessModes
    Value array
    Example [ReadWriteOnce]
    Description The Kubernetes PersistentVolumeClaim access modes for the Percona XtraDB cluster
    Key pxc.volumeSpec.resources.requests.storage
    Value string
    Example 6Gi
    Description The Kubernetes PersistentVolumeClaim size for the Percona XtraDB cluster
    Key pxc.gracePeriod
    Value int
    Example 600
    Description The Kubernetes grace period when terminating a Pod
    Key pxc.containerSecurityContext
    Value subdoc
    Example privileged: true
    Description A custom Kubernetes Security Context for a Container to be used instead of the default one
    Key pxc.podSecurityContext
    Value subdoc
    Example
    fsGroup: 1001
    supplementalGroups: [1001, 1002, 1003]
    Description A custom Kubernetes Security Context for a Pod to be used instead of the default one
    Key pxc.serviceAccountName
    Value string
    Example percona-xtradb-cluster-operator-workload
    Description The Kubernetes Service Account for Percona XtraDB Cluster Pods
    Key pxc.imagePullPolicy
    Value string
    Example Always
    Description The policy used to update images
    Key pxc.runtimeClassName
    Value string
    Example image-rc
    Description Name of the Kubernetes Runtime Class for Percona XtraDB Cluster Pods
    Key pxc.sidecars.image
    Value string
    Example busybox
    Description Image for the custom sidecar container for Percona XtraDB Cluster Pods
    Key pxc.sidecars.command
    Value array
    Example ["/bin/sh"]
    Description Command for the custom sidecar container for Percona XtraDB Cluster Pods
    Key pxc.sidecars.args
    Value array
    Example ["-c", "while true; do trap 'exit 0' SIGINT SIGTERM SIGQUIT SIGKILL; done;"]
    Description Command arguments for the custom sidecar container for Percona XtraDB Cluster Pods
    Key pxc.sidecars.name
    Value string
    Example my-sidecar-1
    Description Name of the custom sidecar container for Percona XtraDB Cluster Pods
    Key pxc.sidecars.resources.requests.memory
    Value string
    Example 1G
    Description The Kubernetes memory requests for a Percona XtraDB Cluster sidecar container
    Key pxc.sidecars.resources.requests.cpu
    Value string
    Example 500m
    Description Kubernetes CPU requests for a Percona XtraDB Cluster sidecar container
    Key pxc.sidecars.resources.limits.memory
    Value string
    Example 2G
    Description Kubernetes memory limits for a Percona XtraDB Cluster sidecar container
    Key pxc.sidecars.resources.limits.cpu
    Value string
    Example 600m
    Description Kubernetes CPU limits for a Percona XtraDB Cluster sidecar container

    HAProxy section¶

    The haproxy section in the deploy/cr.yaml file contains configuration options for the HAProxy service.

    Key haproxy.enabled
    Value boolean
    Example true
    Description Enables or disables load balancing with HAProxy Services
    Key haproxy.size
    Value int
    Example 2
    Description The number of the HAProxy Pods to provide load balancing. It should be 2 or more unless the spec.allowUnsafeConfigurations key is set to true
    Key haproxy.image
    Value string
    Example percona/percona-xtradb-cluster-operator:1.12.0-haproxy
    Description HAProxy Docker image to use
    Key haproxy.imagePullPolicy
    Value string
    Example Always
    Description The policy used to update images
    Key haproxy.imagePullSecrets.name
    Value string
    Example private-registry-credentials
    Description The Kubernetes imagePullSecrets for the HAProxy image
    Key haproxy.readinessDelaySec
    Value int
    Example 15
    Description Adds a delay before a run check to verify the application is ready to process traffic
    Key haproxy.livenessDelaySec
    Value int
    Example 300
    Description Adds a delay before the run check ensures the application is healthy and capable of processing requests
    Key haproxy.configuration
    Value string
    Example
    Description The custom HAProxy configuration file contents
    Key haproxy.annotations
    Value label
    Example iam.amazonaws.com/role: role-arn
    Description The Kubernetes annotations metadata
    Key haproxy.labels
    Value label
    Example rack: rack-22
    Description Labels are key-value pairs attached to objects
    Key haproxy.readinessProbes.initialDelaySeconds
    Value int
    Example 15
    Description Number of seconds to wait before performing the first readiness probe
    Key haproxy.readinessProbes.timeoutSeconds
    Value int
    Example 1
    Description Number of seconds after the container has started before readiness probes are initiated
    Key haproxy.readinessProbes.periodSeconds
    Value int
    Example 5
    Description How often (in seconds) to perform the readiness probe
    Key haproxy.readinessProbes.successThreshold
    Value int
    Example 1
    Description Minimum consecutive successes for the readiness probe to be considered successful after having failed
    Key haproxy.readinessProbes.failureThreshold
    Value int
    Example 3
    Description When the readiness probe fails, Kubernetes will try this number of times before marking the Pod Unready
    Key haproxy.serviceType
    Value string
    Example ClusterIP
    Description Specifies the type of Kubernetes Service to be used for HAProxy
    Key haproxy.externalTrafficPolicy
    Value string
    Example Cluster
    Description Specifies whether Service for HAProxy should route external traffic to cluster-wide or to node-local endpoints (it can influence the load balancing effectiveness)
    Key haproxy.resources.requests.memory
    Value string
    Example 1G
    Description The Kubernetes memory requests for the main HAProxy container
    Key haproxy.resources.requests.cpu
    Value string
    Example 600m
    Description Kubernetes CPU requests for the main HAProxy container
    Key haproxy.resources.limits.memory
    Value string
    Example 1G
    Description Kubernetes memory limits for the main HAProxy container
    Key haproxy.resources.limits.cpu
    Value string
    Example 700m
    Description Kubernetes CPU limits for the main HAProxy container
    Key haproxy.envVarsSecret
    Value string
    Example my-env-var-secrets
    Description A secret with environment variables, see Define environment variables for details
    Key haproxy.priorityClassName
    Value string
    Example high-priority
    Description The Kubernetes Pod Priority class for HAProxy
    Key haproxy.schedulerName
    Value string
    Example mycustom-scheduler
    Description The Kubernetes Scheduler
    Key haproxy.nodeSelector
    Value label
    Example disktype: ssd
    Description Kubernetes nodeSelector
    Key haproxy.affinity.topologyKey
    Value string
    Example kubernetes.io/hostname
    Description The Operator topology key node anti-affinity constraint
    Key haproxy.affinity.advanced
    Value subdoc
    Example
    Description If available it makes a topologyKey node affinity constraint to be ignored
    Key haproxy.tolerations
    Value subdoc
    Example node.alpha.kubernetes.io/unreachable
    Description Kubernetes Pod tolerations
    Key haproxy.podDisruptionBudget.maxUnavailable
    Value int
    Example 1
    Description The Kubernetes podDisruptionBudget specifies the number of Pods from the set unavailable after the eviction
    Key haproxy.podDisruptionBudget.minAvailable
    Value int
    Example 0
    Description The Kubernetes podDisruptionBudget Pods that must be available after an eviction
    Key haproxy.gracePeriod
    Value int
    Example 30
    Description The Kubernetes grace period when terminating a Pod
    Key haproxy.loadBalancerSourceRanges
    Value string
    Example 10.0.0.0/8
    Description The range of client IP addresses from which the load balancer should be reachable (if not set, there is no limitations)
    Key haproxy.loadBalancerIP
    Value string
    Example 127.0.0.1
    Description The static IP-address for the load balancer
    Key haproxy.serviceLabels
    Value label
    Example rack: rack-23
    Description The Kubernetes labels for the load balancer Service
    Key haproxy.serviceAnnotations
    Value string
    Example service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
    Description The Kubernetes annotations metadata for the load balancer Service
    Key haproxy.replicasServiceEnabled
    Value boolean
    Example true
    Description Enables or disables haproxy-replicas Service. This Service (on by default) forwards requests to all Percona XtraDB Cluster instances, and it should not be used for write requests!
    Key haproxy.replicasLoadBalancerSourceRanges
    Value string
    Example 10.0.0.0/8
    Description The range of client IP addresses from which the load balancer should be reachable (if not set, there is no limitations)
    Key haproxy.replicasLoadBalancerIP
    Value string
    Example 127.0.0.1
    Description The static IP-address for the replicas load balancer
    Key haproxy.replicasServiceType
    Value string
    Example ClusterIP
    Description Specifies the type of Kubernetes Service to be used for HAProxy replicas
    Key haproxy.replicasExternalTrafficPolicy
    Value string
    Example Cluster
    Description Specifies whether Service for HAProxy replicas should route external traffic to cluster-wide or to node-local endpoints (it can influence the load balancing effectiveness)
    Key haproxy.replicasServiceLabels
    Value label
    Example rack: rack-23
    Description The Kubernetes labels for the haproxy-replicas Service
    Key haproxy.replicasServiceAnnotations
    Value string
    Example service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
    Description The Kubernetes annotations metadata for the haproxy-replicas Service
    Key haproxy.containerSecurityContext
    Value subdoc
    Example privileged: true
    Description A custom Kubernetes Security Context for a Container to be used instead of the default one
    Key haproxy.podSecurityContext
    Value subdoc
    Example
    fsGroup: 1001
    supplementalGroups: [1001, 1002, 1003]
    Description A custom Kubernetes Security Context for a Pod to be used instead of the default one
    Key haproxy.serviceAccountName
    Value string
    Example percona-xtradb-cluster-operator-workload
    Description The Kubernetes Service Account for the HAProxy Pod
    Key haproxy.runtimeClassName
    Value string
    Example image-rc
    Description Name of the Kubernetes Runtime Class for the HAProxy Pod
    Key haproxy.sidecars.image
    Value string
    Example busybox
    Description Image for the custom sidecar container for the HAProxy Pod
    Key haproxy.sidecars.command
    Value array
    Example ["/bin/sh"]
    Description Command for the custom sidecar container for the HAProxy Pod
    Key haproxy.sidecars.args
    Value array
    Example ["-c", "while true; do trap 'exit 0' SIGINT SIGTERM SIGQUIT SIGKILL; done;"]
    Description Command arguments for the custom sidecar container for the HAProxy Pod
    Key haproxy.sidecars.name
    Value string
    Example my-sidecar-1
    Description Name of the custom sidecar container for the HAProxy Pod
    Key haproxy.sidecars.resources.requests.memory
    Value string
    Example 1G
    Description The Kubernetes memory requests for the sidecar HAProxy containers
    Key haproxy.sidecars.resources.requests.cpu
    Value string
    Example 500m
    Description Kubernetes CPU requests for the sidecar HAProxy containers
    Key haproxy.sidecars.resources.limits.memory
    Value string
    Example 2G
    Description Kubernetes memory limits for the sidecar HAProxy containers
    Key haproxy.sidecars.resources.limits.cpu
    Value string
    Example 600m
    Description Kubernetes CPU limits for the sidecar HAProxy containers

    ProxySQL section¶

    The proxysql section in the deploy/cr.yaml file contains configuration options for the ProxySQL daemon.

    Key proxysql.enabled
    Value boolean
    Example false
    Description Enables or disables load balancing with ProxySQL Services
    Key proxysql.size
    Value int
    Example 2
    Description The number of the ProxySQL daemons to provide load balancing. It should be 2 or more unless the spec.allowUnsafeConfigurations key is set to true
    Key proxysql.image
    Value string
    Example percona/percona-xtradb-cluster-operator:1.12.0-proxysql
    Description ProxySQL Docker image to use
    Key proxysql.imagePullPolicy
    Value string
    Example Always
    Description The policy used to update images
    Key proxysql.imagePullSecrets.name
    Value string
    Example private-registry-credentials
    Description The Kubernetes imagePullSecrets for the ProxySQL image
    Key proxysql.readinessDelaySec
    Value int
    Example 15
    Description Adds a delay before a run check to verify the application is ready to process traffic
    Key proxysql.livenessDelaySec
    Value int
    Example 300
    Description Adds a delay before the run check ensures the application is healthy and capable of processing requests
    Key proxysql.configuration
    Value string
    Example
    Description The custom ProxySQL configuration file contents
    Key proxysql.annotations
    Value label
    Example iam.amazonaws.com/role: role-arn
    Description The Kubernetes annotations metadata
    Key proxysql.labels
    Value label
    Example rack: rack-22
    Description Labels are key-value pairs attached to objects
    Key proxysql.serviceType
    Value string
    Example ClusterIP
    Description Specifies the type of Kubernetes Service to be used
    Key proxysql.externalTrafficPolicy
    Value string
    Example Cluster
    Description Specifies whether Service should route external traffic to cluster-wide or node-local endpoints (it can influence the load balancing effectiveness)
    Key proxysql.resources.requests.memory
    Value string
    Example 1G
    Description The Kubernetes memory requests for the main ProxySQL container
    Key proxysql.resources.requests.cpu
    Value string
    Example 600m
    Description Kubernetes CPU requests for the main ProxySQL container
    Key proxysql.resources.limits.memory
    Value string
    Example 1G
    Description Kubernetes memory limits for the main ProxySQL container
    Key proxysql.resources.limits.cpu
    Value string
    Example 700m
    Description Kubernetes CPU limits for the main ProxySQL container
    Key proxysql.envVarsSecret
    Value string
    Example my-env-var-secrets
    Description A secret with environment variables, see Define environment variables for details
    Key proxysql.priorityClassName
    Value string
    Example high-priority
    Description The Kubernetes Pod Priority class for ProxySQL
    Key proxysql.schedulerName
    Value string
    Example mycustom-scheduler
    Description The Kubernetes Scheduler
    Key proxysql.nodeSelector
    Value label
    Example disktype: ssd
    Description Kubernetes nodeSelector
    Key proxysql.affinity.topologyKey
    Value string
    Example kubernetes.io/hostname
    Description The Operator topology key node anti-affinity constraint
    Key proxysql.affinity.advanced
    Value subdoc
    Example
    Description If available it makes a topologyKey node affinity constraint to be ignored
    Key proxysql.tolerations
    Value subdoc
    Example node.alpha.kubernetes.io/unreachable
    Description Kubernetes Pod tolerations
    Key proxysql.volumeSpec.emptyDir
    Value string
    Example {}
    Description The Kubernetes emptyDir volume The directory created on a node and accessible to the Percona XtraDB Cluster Pod containers
    Key proxysql.volumeSpec.hostPath.path
    Value string
    Example /data
    Description Kubernetes hostPath The volume that mounts a directory from the host node’s filesystem into your Pod. The path property is required
    Key proxysql.volumeSpec.hostPath.type
    Value string
    Example Directory
    Description The Kubernetes hostPath. An optional property for the hostPath
    Key proxysql.volumeSpec.persistentVolumeClaim.storageClassName
    Value string
    Example standard
    Description Set the Kubernetes storage class to use with the Percona XtraDB Cluster PersistentVolumeClaim
    Key proxysql.volumeSpec.persistentVolumeClaim.accessModes
    Value array
    Example [ReadWriteOnce]
    Description The Kubernetes PersistentVolumeClaim access modes for the Percona XtraDB cluster
    Key proxysql.volumeSpec.resources.requests.storage
    Value string
    Example 6Gi
    Description The Kubernetes PersistentVolumeClaim size for the Percona XtraDB cluster
    Key proxysql.podDisruptionBudget.maxUnavailable
    Value int
    Example 1
    Description The Kubernetes podDisruptionBudget specifies the number of Pods from the set unavailable after the eviction
    Key proxysql.podDisruptionBudget.minAvailable
    Value int
    Example 0
    Description The Kubernetes podDisruptionBudget Pods that must be available after an eviction
    Key proxysql.gracePeriod
    Value int
    Example 30
    Description The Kubernetes grace period when terminating a Pod
    Key proxysql.loadBalancerSourceRanges
    Value string
    Example 10.0.0.0/8
    Description The range of client IP addresses from which the load balancer should be reachable (if not set, there is no limitations)
    Key proxysql.serviceLabels
    Value label
    Example rack: rack-23
    Description The Kubernetes labels for the load balancer Service
    Key proxysql.serviceAnnotations
    Value string
    Example service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
    Description The Kubernetes annotations metadata for the load balancer Service
    Key proxysql.containerSecurityContext
    Value subdoc
    Example privileged: true
    Description A custom Kubernetes Security Context for a Container to be used instead of the default one
    Key proxysql.podSecurityContext
    Value subdoc
    Example
    fsGroup: 1001
    supplementalGroups: [1001, 1002, 1003]
    Description A custom Kubernetes Security Context for a Pod to be used instead of the default one
    Key proxysql.serviceAccountName
    Value string
    Example percona-xtradb-cluster-operator-workload
    Description The Kubernetes Service Account for the ProxySQL Pod
    Key proxysql.runtimeClassName
    Value string
    Example image-rc
    Description Name of the Kubernetes Runtime Class for the ProxySQL Pod
    Key proxysql.sidecars.image
    Value string
    Example busybox
    Description Image for the custom sidecar container for the ProxySQL Pod
    Key proxysql.sidecars.command
    Value array
    Example ["/bin/sh"]
    Description Command for the custom sidecar container for the ProxySQL Pod
    Key proxysql.sidecars.args
    Value array
    Example ["-c", "while true; do trap 'exit 0' SIGINT SIGTERM SIGQUIT SIGKILL; done;"]
    Description Command arguments for the custom sidecar container for the ProxySQL Pod
    Key proxysql.sidecars.name
    Value string
    Example my-sidecar-1
    Description Name of the custom sidecar container for the ProxySQL Pod
    Key proxysql.sidecars.resources.requests.memory
    Value string
    Example 1G
    Description The Kubernetes memory requests for the sidecar ProxySQL containers
    Key proxysql.sidecars.resources.requests.cpu
    Value string
    Example 500m
    Description Kubernetes CPU requests for the sidecar ProxySQL containers
    Key proxysql.sidecars.resources.limits.memory
    Value string
    Example 2G
    Description Kubernetes memory limits for the sidecar ProxySQL containers
    Key proxysql.sidecars.resources.limits.cpu
    Value string
    Example 600m
    Description Kubernetes CPU limits for the sidecar ProxySQL containers

    Log Collector section¶

    The logcollector section in the deploy/cr.yaml file contains configuration options for Fluent Bit Log Collector.

    Key logcollector.enabled
    Value boolean
    Example true
    Description Enables or disables cluster-level logging with Fluent Bit
    Key logcollector.image
    Value string
    Example percona/percona-xtradb-cluster-operator:1.6.0-logcollector
    Description Log Collector Docker image to use
    Key logcollector.configuration
    Value subdoc
    Example
    Description Additional configuration options (see Fluent Bit official documentation for details)
    Key logcollector.resources.requests.memory
    Value string
    Example 100M
    Description The Kubernetes memory requests for a Log Collector container
    Key logcollector.resources.requests.cpu
    Value string
    Example 200m
    Description Kubernetes CPU requests for a Log collector container

    PMM section¶

    The pmm section in the deploy/cr.yaml file contains configuration options for Percona Monitoring and Management.

    Key pmm.enabled
    Value boolean
    Example false
    Description Enables or disables monitoring Percona XtraDB cluster with PMM
    Key pmm.image
    Value string
    Example percona/pmm-client:2.32.0
    Description PMM client Docker image to use
    Key pmm.serverHost
    Value string
    Example monitoring-service
    Description Address of the PMM Server to collect data from the cluster
    Key pmm.serverUser
    Value string
    Example admin
    Description The PMM Serve_User. The PMM Server password should be configured using Secrets
    Key pmm.resources.requests.memory
    Value string
    Example 150M
    Description The Kubernetes memory requests for a PMM container
    Key pmm.resources.requests.cpu
    Value string
    Example 300m
    Description Kubernetes CPU requests for a PMM container
    Key pmm.pxcParams
    Value string
    Example --disable-tablestats-limit=2000
    Description Additional parameters which will be passed to the pmm-admin add mysql command for pxc Pods
    Key pmm.proxysqlParams
    Value string
    Example --custom-labels=CUSTOM-LABELS
    Description Additional parameters which will be passed to the pmm-admin add mysql command for proxysql Pods

    Backup section¶

    The backup section in the deploy/cr.yaml file contains the following configuration options for the regular Percona XtraDB Cluster backups.

    Key backup.image
    Value string
    Example percona/percona-xtradb-cluster-operator:1.12.0-backup
    Description The Percona XtraDB cluster Docker image to use for the backup
    Key backup.backoffLimit
    Value int
    Example 6
    Description The number of retries to make a backup
    Key backup.imagePullSecrets.name
    Value string
    Example private-registry-credentials
    Description The Kubernetes imagePullSecrets for the specified image
    Key backup.storages.<storage-name>.type
    Value string
    Example s3
    Description The cloud storage type used for backups. Only s3 and filesystem types are supported
    Key backup.storages.<storage-name>.verifyTLS
    Value boolean
    Example true
    Description Enable or disable verification of the storage server TLS certificate. Disabling it may be useful e.g. to skip TLS verification for private S3-compatible storage with a self-issued certificate
    Key backup.storages.<storage-name>.s3.credentialsSecret
    Value string
    Example my-cluster-name-backup-s3
    Description The Kubernetes secret for backups. It should contain AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY keys
    Key backup.storages.<storage-name>.s3.bucket
    Value string
    Example
    Description The Amazon S3 bucket name for backups
    Key backup.storages.s3.<storage-name>.region
    Value string
    Example us-east-1
    Description The AWS region to use. Please note this option is mandatory for Amazon and all S3-compatible storages
    Key backup.storages.s3.<storage-name>.endpointUrl
    Value string
    Example
    Description The endpoint URL of the S3-compatible storage to be used (not needed for the original Amazon S3 cloud)
    Key backup.storages.<storage-name>.persistentVolumeClaim.type
    Value string
    Example filesystem
    Description The persistent volume claim storage type
    Key backup.storages.<storage-name>.persistentVolumeClaim.storageClassName
    Value string
    Example standard
    Description Set the Kubernetes Storage Class to use with the Percona XtraDB Cluster backups PersistentVolumeClaims for the filesystem storage type
    Key backup.storages.<storage-name>.volume.persistentVolumeClaim.accessModes
    Value array
    Example [ReadWriteOne]
    Description The Kubernetes PersistentVolume access modes
    Key backup.storages.<storage-name>.volume.persistentVolumeClaim.resources.requests.storage
    Value string
    Example 6Gi
    Description Storage size for the PersistentVolume
    Key backup.storages.<storage-name>.annotations
    Value label
    Example iam.amazonaws.com/role: role-arn
    Description The Kubernetes annotations
    Key backup.storages.<storage-name>.labels
    Value label
    Example rack: rack-22
    Description Labels are key-value pairs attached to objects
    Key backup.storages.<storage-name>.resources.requests.memory
    Value string
    Example 1G
    Description The Kubernetes memory requests for a Percona XtraDB Cluster container
    Key backup.storages.<storage-name>.resources.requests.cpu
    Value string
    Example 600m
    Description Kubernetes CPU requests for a Percona XtraDB Cluster container
    Key backup.storages.<storage-name>.resources.limits.memory
    Value string
    Example 1G
    Description Kubernetes memory limits for a Percona XtraDB Cluster container
    Key backup.storages.<storage-name>.nodeSelector
    Value label
    Example disktype: ssd
    Description Kubernetes nodeSelector
    Key backup.storages.<storage-name>.affinity.nodeAffinity
    Value subdoc
    Example
    Description The Operator node affinity constraint
    Key backup.storages.<storage-name>.tolerations
    Value subdoc
    Example backupWorker
    Description Kubernetes Pod tolerations
    Key backup.storages.<storage-name>.priorityClassName
    Value string
    Example high-priority
    Description The Kubernetes Pod priority class
    Key backup.storages.<storage-name>.schedulerName
    Value string
    Example mycustom-scheduler
    Description The Kubernetes Scheduler
    Key backup.storages.<storage-name>.containerSecurityContext
    Value subdoc
    Example privileged: true
    Description A custom Kubernetes Security Context for a Container to be used instead of the default one
    Key backup.storages.<storage-name>.podSecurityContext
    Value subdoc
    Example
    fsGroup: 1001
    supplementalGroups: [1001, 1002, 1003]
    Description A custom Kubernetes Security Context for a Pod to be used instead of the default one
    Key backup.schedule.name
    Value string
    Example sat-night-backup
    Description The backup name
    Key backup.schedule.schedule
    Value string
    Example 0 0 \* \* 6
    Description Scheduled time to make a backup specified in the crontab format
    Key backup.schedule.keep
    Value int
    Example 3
    Description The amount of most recent backups to store. Older backups are automatically deleted. Set keep to zero or completely remove it to disable automatic deletion of backups
    Key backup.schedule.storageName
    Value string
    Example s3-us-west
    Description The name of the storage for the backups configured in the storages or fs-pvc subsection
    Key backup.pitr.enabled
    Value boolean
    Example false
    Description Enables or disables point-in-time-recovery functionality
    Key backup.pitr.storageName
    Value string
    Example s3-us-west
    Description The name of the storage for the backups configured in the storages subsection, which will be reused to store binlog for point-in-time-recovery
    Key backup.pitr.timeBetweenUploads
    Value int
    Example 60
    Description Seconds between running the binlog uploader

    PerconaXtraDBClusterRestore Custom Resource options¶

    Percona XtraDB Cluster Restore options are managed by the Operator via the PerconaXtraDBClusterRestore Custom Resource and can be configured via the deploy/backup/restore.yaml configuration file. This Custom Resource contains the following options:

    Key Value type Description Required
    metadata.name string The name of the restore true
    spec.pxcCluster string Percona XtraDB Cluster name (the name of your running cluster) true
    spec.backupName string The name of the backup which should be restored false
    spec.backupSource subdoc Defines configuration for different restore sources false
    spec.pitr subdoc Defines configuration for PITR restore false

    backupSource section¶

    Key Value type Description Required
    destination string Path to the backup false
    storageName string The storage name from CR spec.backup.storages false
    s3 subdoc Define configuration for s3 compatible storages false
    azure subdoc Define configuration for azure blob storage false

    backupSource.s3 subsection¶

    Key Value type Description Required
    bucket string The bucket with a backup true
    credentialsSecret string The Secret name for the backup true
    endpointUrl string A valid endpoint URL false
    region string The region corresponding to the S3 bucket false

    backupSource.azure subsection¶

    Key Value type Description Required
    credentialsSecret string The Secret name for the azure blob storage true
    container string The container name of the azure blob storage true
    endpointUrl string A valid endpoint URL false
    storageClass string The storage class name of the azure storage false

    pitr subsection¶

    Key Value type Description Required
    type string The type of PITR recover true
    date string The exact date of recovery true
    gtid string The exact GTID for PITR recover true
    spec.backupSource subdoc Percona XtraDB Cluster backups section true
    s3 subdoc Defines configuration for s3 compatible storages false
    azure subdoc Defines configuration for azure blob storage false

    Contact Us

    For free technical help, visit the Percona Community Forum.

    To report bugs or submit feature requests, open a JIRA ticket.

    For paid support and managed or consulting services , contact Percona Sales.


    Last update: 2023-02-09
    Back to top
    Percona LLC and/or its affiliates, © 2009 - 2022
    Made with Material for MkDocs

    Cookie consent

    We use cookies to recognize your repeated visits and preferences, as well as to measure the effectiveness of our documentation and whether users find what they're searching for. With your consent, you're helping us to make our documentation better.