You are looking at the documentation of a prior release. To read the documentation of the latest release, please
visit here.
New to KubeDB? Please start here.
Rotate Authentication of ProxySQL
This guide will give an overview on how KubeDB Ops-manager operator rotates the authentication credentials of a ProxySQL server.
Before You Begin
- You should be familiar with the following
KubeDBconcepts:
How Rotate ProxySQL Authentication Process Works
The auth secret of a KubeDB managed ProxySQL holds the credentials of the ProxySQL admin interface. KubeDB uses these credentials for the admin-admin_credentials, admin-cluster_username and admin-cluster_password admin variables, so the operator and the ProxySQL cluster nodes use them to manage and sync the servers.
The authentication rotation process for ProxySQL using KubeDB involves the following steps:
A user first creates a
ProxySQLCustom Resource Object (CRO) that points to a MySQL backend.The
KubeDB Provisioner operatorcontinuously watches forProxySQLCROs.When the operator detects a
ProxySQLCR, it provisions the requiredPetSet, along with related resources such as the auth secret, the configuration secret, services and other dependencies.To initiate authentication rotation, the user creates a
ProxySQLOpsRequestCR of typeRotateAuth.The
KubeDB Ops-manageroperator watches forProxySQLOpsRequestCRs.Upon detecting a
ProxySQLOpsRequest, the operator pauses the referencedProxySQLobject, ensuring that the Provisioner operator does not perform any operations during the authentication rotation process.The
Ops-manageroperator then updates the auth secret with the new credentials. It either generates a new password or uses the user provided secret, and keeps the previous credentials under theusername.prevandpassword.prevkeys.The operator updates the ProxySQL configuration secret and the
PetSetwith the new credentials, then restarts allProxySQLPods so they come up with the new admin credentials.Once the authentication rotation is completed successfully, the operator updates
spec.authSecretof theProxySQLobject and resumes it, allowing the Provisioner operator to continue its usual operations.
In the next section, we will walk you through a step-by-step guide to rotating ProxySQL authentication using the ProxySQLOpsRequest CRD.
































