Deploy and Configure Security
By default, the manifests shipped with the packages have security disabled, therefore adjust accordingly based on your options below
Option A: Deploy WITHOUT security (No SSL/TLS) - Default
The manifests are pre-configured with security disabled. This is the quickest way to get started.
The security settings that are configured by default, are within the configmap-tungsten.yaml, an example is shown below:
disable-security-controls=true
connector-ssl-capable=false
connector-driver-options=?useSSL=false
In the deployment.yaml file, the security volume mounts are commented out.
Initiate deployment without security
Apply all manifests (secret-security.yaml is optional without security) using the kubectl command.
shell> kubectl apply -f namespace.yaml
shell> kubectl apply -f configmap-tungsten.yaml
shell> kubectl apply -f configmap-listeners.yaml
shell> kubectl apply -f secret-credentials.yaml
shell> kubectl apply -f deployment.yaml
shell> kubectl apply -f service.yaml
Or, apply them all at once:
shell> kubectl apply -f .
To test without SSL, get the LoadBalancer external IP:
shell> kubectl -n tungsten-connector get service tungsten-connector
Wait for the EXTERNAL-IP to be assigned, then connect, replacing [EXTERNAL-IP] with the actual IP from the command above:
shell> mysql -h [EXTERNAL-IP] -u app_user -psecret -P 3306
Option B: Deploy WITH Security (SSL/TLS)
If you want to enable SSL/TLS security, follow these steps:
Enable Security in Configuration
Edit
configmap-tungsten.yamland change these three settingsChange from
truetofalse:disable-security-controls=falseChange from
falsetotrue:connector-ssl-capable=trueChange from
'?useSSL=false'to'?useSSL=true'[object Object]
Required SSL Certificate Files
You must obtain these files from an existing Tungsten Cluster node (typically from
/opt/continuent/share) where security is enabled:passwords.storetungsten_keystore.jkstungsten_truststore.tstungsten_connector_keystore.jkstungsten_connector_truststore.tstungsten_tls_keystore.jksAdd SSL Certificates to Secret
Base64-encode each file:
shell> cat passwords.store | base64shell> cat tungsten_keystore.jks | base64shell> cat tungsten_truststore.ts | base64shell> cat tungsten_connector_keystore.jks | base64shell> cat tungsten_connector_truststore.ts | base64shell> cat tungsten_tls_keystore.jks | base64Edit
secret-security.yamland uncomment thedata:section (around line 67), then add the base64-encoded content:data:passwords.store: >BASE64_ENCODED_CONTENT<tungsten_keystore.jks: >BASE64_ENCODED_CONTENT<tungsten_truststore.ts: >BASE64_ENCODED_CONTENT<tungsten_connector_keystore.jks: >BASE64_ENCODED_CONTENT<tungsten_connector_truststore.ts: >BASE64_ENCODED_CONTENT<tungsten_tls_keystore.jks: >BASE64_ENCODED_CONTENT<Uncomment Security Volume Mounts
Edit
deployment.yamland uncomment the security sections:Uncomment the lines for the Volume Mounts (around lines 111-120):
- name: tungsten-securitymountPath: /opt/continuent/tungsten/cluster-home/conf/security.propertiessubPath: security.propertiesreadOnly: true- name: ssl-certsmountPath: /opt/continuent/sharereadOnly: trueUncomment the lines for the Volumes (around lines 138-163):
- name: tungsten-securitysecret:secretName: tungsten-securityitems:- key: security.propertiespath: security.properties- name: ssl-certssecret:secretName: tungsten-securityoptional: trueitems:- key: passwords.storepath: passwords.store- key: tungsten_keystore.jkspath: tungsten_keystore.jks- key: tungsten_truststore.tspath: tungsten_truststore.ts- key: tungsten_connector_keystore.jkspath: tungsten_connector_keystore.jks- key: tungsten_connector_truststore.tspath: tungsten_connector_truststore.ts- key: tungsten_tls_keystore.jkspath: tungsten_tls_keystore.jksDeploy with Security
Apply all manifests using the
kubectl command:shell> kubectl apply -f namespace.yamlshell> kubectl apply -f configmap-tungsten.yamlshell> kubectl apply -f configmap-listeners.yamlshell> kubectl apply -f secret-credentials.yamlshell> kubectl apply -f secret-security.yamlshell> kubectl apply -f deployment.yamlshell> kubectl apply -f service.yamlOr apply all at once:
shell> kubectl apply -f .
To test with SSL:
Get the LoadBalancer external IP:
shell> kubectl -n tungsten-connector get service tungsten-connector
Wait for EXTERNAL-IP to be assigned, then connect with SSL replacing [EXTERNAL-IP] with the actual IP from the command above
shell> mysql -h [EXTERNAL-IP] -u app_user -psecret -P 3306 --ssl-ca=ca.pem --ssl-cert=client-cert.pem --ssl-key=client-key.pem --ssl-verify-server-cert=false