porthole/images/mysqlclient-utility
Sergiy Markin e2b4199c4c Security updates
This PS updates Openstack modules to Caracal
2024.1, updates base ubuntu  image to
quay.io/airshipit, Helm to v3.15.2 and Kubectl to
1.32.0

Change-Id: I0c4f16443ae88e4cfbc54e23222eaf84264580b5
2024-12-24 00:58:28 +00:00
..
2023-06-23 18:48:26 +00:00
2024-08-15 16:47:05 -04:00
2024-12-24 00:58:28 +00: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 |\
        +--------------------+\