MySQL
MySQL is an open-source relational database management system (RDBMS) available under the terms of the GNU General Public License.
To deploy MysQL in Kubernetes (or Red Hat OpenShift), we are going to use a Helm chart provided by Bitnami. Bitnami makes it easy to get open source software up and running on any platform, including laptop, Kubernetes and major cloud providers.
Prerequisites
- Kubernetes cluster accessible with
kubectl
CLI - Install Helm
Supporting Docs
Install MySQL
Get the bitnami
Helm repository:
Install the chart (provide a valid ${NAMESPACE}
):
Optional: if running on OpenShift, grant privileged
SCC to the mysql
service account in ${NAMESPACE}
namespace:
Access MySQL instance
Retrieve root password from the created mysql
by running the following command:
Use port forwarding to access MySQL using kubectl port-forward
command:
On a second terminal, you can then access your MySQL instance by running the following command (type your root password retrieved in above steps):