Setting Up Kubernetes Connector

Extract the connector package and load its Docker image and configuration files.

1 min read Updated SS

Note: This connector can run on any operating system that supports docker.

  1. Untar connector.tar.gz file.

    tar -xvf connector.tar.gz
    

    You 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.

  2. Execute the following command to load the Docker image.

    docker load -i ext-system-adapter_<tag>.tar
    
  3. Untar conf.tar and sql.tar files.

    tar -xvf conf.tar
    tar -xvf sql.tar
    
  4. 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
    
  5. Create a folder named logs inside the connector folder. The adapter places the log files it creates in the logs folder.

  6. As per the configuration you require, update .sql scripts in the sql folder.

    Refer to Configuring Kubernetes Connector.

  7. Execute all .sql scripts in the sql folder in MySQL on the server, where MySQL runs, to create the requisite database schema and tables.

  8. 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"
    
  9. As not all connectors support TLSv1.3, follow the steps below to update TLSv1.2 in addition to TLSv1.3.

    1. Open the my.cnf file in the below path:

      <Installer path>/conf/PERCONA/
      
    2. Update TLSv1.2 along with the TLSv1.3.

      tls_version=<TLS version 2>,<TLS version 3>
      

      For example:

      tls_version=TLSv1.2,TLSv1.3
      
  10. 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>
    
  11. Execute the following command to start the adapter.

    docker start <container name>
    
  12. Execute the following command to stop the adapter.

    docker stop <container name>