Deploy MySQL on KubeSphere

    This tutorial walks you through an example of deploying MySQL from the App Store of KubeSphere.

    Hands-on Lab

    1. On the Overview page of the project , click App Store in the top left corner.

    2. Find MySQL and click Deploy on the App Info page.

      find-mysql

    3. Set a name and select an app version. Make sure MySQL is deployed in demo-project and click Next.

      deploy-mysql

    4. In App Config, uncomment the field and customize the password. Click Deploy to continue.

    5. mysql-running

    1. Go to Workloads and click the service name of MySQL.

    2. In the terminal, execute mysql -uroot -ptesting to log in to MySQL as the root user.

      log-in-mysql

    To access MySQL outside the cluster, you need to expose the app through a NodePort first.

    1. Go to Services and click the service name of MySQL.

    2. edit-internet-access

    3. Select NodePort for Access Method and click OK. For more information, see Project Gateway.

    4. Under Service Ports, you can see the port is exposed. The port and public IP will be used in the next step to access the MySQL database.

      mysql-port-number

    5. To access your MySQL database, you need to use the MySQL client or install a third-party application such as SQLPro Studio for the connection. The following example demonstrates how to access the MySQL database through SQLPro Studio.

      access-mysql-success

      Note

      You may need to open the port in your security groups and configure related port forwarding rules depending on your where your Kubernetes cluster is deployed.