Providing TLS setup
This page covers migration-specific TLS configuration only. For TLS modes, certificate requirements, and securing the MySQL server itself, refer to Securing Connections to an External MySQL 8 compliant database.
Step 1: Set the mode
Set the TLS mode in migrate_5x_to_6/scripts/migration-override.env — one file, used for both Kubernetes and Docker Swarm. Values are case-sensitive and hyphenated.
MYSQL_SERVICE_SSL_MODE="verify-ca" # trust | verify-ca | verify-full
MYSQL_SERVICE_MUTUAL_TLS="disable" # disable | enable
Step 2: Supply the PEM files
The PEM template files are located in templates/k8s/ (Kubernetes) or templates/swarm/ (Docker Swarm). Replace the placeholder content in each file, but do not rename the files.
| PEM file | Needed when | Created by |
|---|---|---|
mysql-service-ca.pem | MYSQL_SERVICE_SSL_MODE is verify-ca or verify-full | Deploy script (ConfigMap / config) |
mysql-service-client-cert.pem | MYSQL_SERVICE_MUTUAL_TLS is enable | Deploy script (ConfigMap / config) |
mysql-service-client-key.pem | MYSQL_SERVICE_MUTUAL_TLS is enable | You — create as a Secret before deploying |
note
The deploy script does not create the client key Secret. Create it yourself before deploying, or the deployment fails.
# Kubernetes
kubectl create secret generic mysql-service-client-key \
--from-file=templates/k8s/mysql-service-client-key.pem
# Docker Swarm (run on the manager node)
docker secret create migration-mysql-key templates/swarm/mysql-service-client-key.pem
Next steps: Customize migration configuration
Continue to Customizing migration configuration.