porthole/images/mysqlclient-utility
Sergiy Markin 5ead2930ae Restore bionic images
This PS restores building ans testing bionic images

Change-Id: Id88e1c096a8934e5974b9404cc2b0bfd748fc25f
2023-06-07 04:15:14 +00:00
..
Dockerfile.ubuntu_bionic Restore bionic images 2023-06-07 04:15:14 +00:00
Dockerfile.ubuntu_focal Update kubectl version to 1.27.1 2023-05-19 09:41:08 -04:00
README.md Editorial changes to documentation files 2019-12-16 09:21:19 -06:00

Mysqlclient-utility Container

This utility container allows Operations personnel to access MariaDB pods remotely to perform database functions. Authorized users in UCP Keystone RBAC will able to run queries through the utilscli helper.

Usage

Get into the utility pod using kubectl exec.

        kubectl exec -it <POD_NAME> -n utility /bin/bash

Testing Connectivity to Mariadb (Optional)

  1. Find the mariadb pod and its corresponding IP.
       kubectl get pods --all-namespaces | grep -i mariadb-server | awk '{print $1,$2}' \
       | while read a b ; do kubectl get pod $b -n $a -o wide
       done
  1. Connect to the indicated pod by providing the arguments specified for the CLI as shown below.
       kubectl exec <POD_NAME> -it -n utility -- mysql -h <IP> -u root -p<PASSWORD> \
              -e 'show databases;'

The output should resemble the following.

        >--------------------+\
        | Database           |\
        |--------------------|\
        | cinder             |\
        | glance             |\
        | heat               |\
        | horizon            |\
        | information_schema |\
        | keystone           |\
        | mysql              |\
        | neutron            |\
        | nova               |\
        | nova_api           |\
        | nova_cell0         |\
        | performance_schema |\
        +--------------------+\