You are looking at the documentation of a prior release. To read the documentation of the latest release, please
visit here.
We use cookies and other similar technology to collect data to improve your experience on our site, as described in our Privacy Policy.
Run Production-Grade Databases on Kubernetes
Backup and Recovery Solution for Kubernetes
Run Production-Grade Vault on Kubernetes
Secure HAProxy Ingress Controller for Kubernetes
Kubernetes Configuration Syncer
Kubernetes Authentication WebHook Server
KubeDB simplifies Provision, Upgrade, Scaling, Volume Expansion, Monitor, Backup, Restore for various Databases in Kubernetes on any Public & Private Cloud
A complete Kubernetes native disaster recovery solution for backup and restore your volumes and databases in Kubernetes on any public and private clouds.
KubeVault is a Git-Ops ready, production-grade solution for deploying and configuring Hashicorp's Vault on Kubernetes.
Secure HAProxy Ingress Controller for Kubernetes
Kubernetes Configuration Syncer
Kubernetes Authentication WebHook Server
New to KubeDB? Please start here.
ProxySQLAutoscaler
is a Kubernetes Custom Resource Definitions
(CRD). It provides a declarative configuration for autoscaling ProxySQL compute resources and storage of database components in a Kubernetes native way.
Like any official Kubernetes resource, a ProxySQLAutoscaler
has TypeMeta
, ObjectMeta
, Spec
and Status
sections.
Here, some sample ProxySQLAutoscaler
CROs for autoscaling different components of database is given below:
Sample ProxySQLAutoscaler
for ProxySQL:
apiVersion: autoscaling.kubedb.com/v1alpha1
kind: ProxySQLAutoscaler
metadata:
name: psops-autoscale
namespace: demo
spec:
proxyRef:
name: sample-proxysql
compute:
proxysql:
trigger: "On"
podLifeTimeThreshold: 5m
minAllowed:
cpu: 250m
memory: 350Mi
maxAllowed:
cpu: 1
memory: 1Gi
controlledResources: ["cpu", "memory"]
Here, we are going to describe the various sections of a ProxySQLAutoscaler
crd.
A ProxySQLAutoscaler
object has the following fields in the spec
section.
spec.proxyRef
is a required field that point to the ProxySQL object for which the autoscaling will be performed. This field consists of the following sub-field:
spec.compute
specifies the autoscaling configuration for the compute resources i.e. cpu and memory of the proxysql components. This field consists of the following sub-field:
spec.compute.proxysql
indicates the desired compute autoscaling configuration for a ProxySQL standalone or cluster.All of them has the following sub-fields:
trigger
indicates if compute autoscaling is enabled for this component of the database. If “On” then compute autoscaling is enabled. If “Off” then compute autoscaling is disabled.minAllowed
specifies the minimal amount of resources that will be recommended, default is no minimum.maxAllowed
specifies the maximum amount of resources that will be recommended, default is no maximum.controlledResources
specifies which type of compute resources (cpu and memory) are allowed for autoscaling. Allowed values are “cpu” and “memory”.containerControlledValues
specifies which resource values should be controlled. Allowed values are “RequestsAndLimits” and “RequestsOnly”.resourceDiffPercentage
specifies the minimum resource difference between recommended value and the current value in percentage. If the difference percentage is greater than this value than autoscaling will be triggered.podLifeTimeThreshold
specifies the minimum pod lifetime of at least one of the pods before triggering autoscaling.InMemoryScalingThreshold
the percentage of the Memory that will be passed as inMemorySizeGB for inmemory database engine, which is only available for the percona variant of the proxysql.