Setting Up Kubernetes Connector
Extract the connector package and load its Docker image and configuration files.
Note: This connector can run on any operating system that supports docker.
-
Untar connector.tar.gz file.
tar -xvf connector.tar.gzYou get a connector folder which contains the following files:
conf.tar file
sql.tar file
ext-system-adapter_<tag>.tar file
Note: ext-system-adapter_<tag>.tar file is a Docker image which you can load directly in Docker.
-
Execute the following command to load the Docker image.
docker load -i ext-system-adapter_<tag>.tar -
Untar conf.tar and sql.tar files.
tar -xvf conf.tar tar -xvf sql.tar -
The conf folder contains all the configuration files of the connector. The conf folder contains adapter-conf.yaml, importCert.sh, and logback.xml files.
The sql folder contains the following Kubernetes files.
Kubernetes/adapter.sql Kubernetes/adapter_dao_sql.sql Kubernetes/adapter_kuberenetes_dao_data_insert.sql Kubernetes/adapter_ kuberenetes_insert.sql Kubernetes/ kuberenetes_dao.sql -
Create a folder named logs inside the connector folder. The adapter places the log files it creates in the logs folder.
-
As per the configuration you require, update .sql scripts in the sql folder.
Refer to Configuring Kubernetes Connector.
-
Execute all .sql scripts in the sql folder in MySQL on the server, where MySQL runs, to create the requisite database schema and tables.
-
Update values of the following parameters in the adapter-conf.yaml file in the conf folder.
hibernate.connection.username,
hibernate.connection.password,
hibernate.connection.url
For example:
"jdbc:mysql://<ip-address>:<port number>/<dataadapter>? verifyServerCertificate=false&useSSL=true&requireSSL=true&enabledTLS Protocols=TLSv1.2&useServerPrepStmts=true&cacheServerConfiguration=t rue" -
As not all connectors support TLSv1.3, follow the steps below to update TLSv1.2 in addition to TLSv1.3.
-
Open the my.cnf file in the below path:
<Installer path>/conf/PERCONA/ -
Update TLSv1.2 along with the TLSv1.3.
tls_version=<TLS version 2>,<TLS version 3>For example:
tls_version=TLSv1.2,TLSv1.3
-
-
Execute the following command to create the container.
sudo docker run -d -t --name="<container-name>" --add- host=haproxy.example:<ip address> -v <path>/connector/conf/: <path>/ext-system-adapter/conf/:rw -v <path>/connector/logs/: <path>/ext-system-adapter/logs/:rw ext-system-adapter:<tag> -
Execute the following command to start the adapter.
docker start <container name> -
Execute the following command to stop the adapter.
docker stop <container name>