Skip to content

An example NodeJS app with a MySQL persistent storage on Kubernetes

Notifications You must be signed in to change notification settings

limal/kubernetes-nodejs-mysql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NodeJS and MySQL on Kubernetes

To start:

skaffold dev

If you want to connect directly to your MySQL service from your host machine. Simply get an URL from minikube and use it as a hostname. Remember that the port is not going to be the default 3306 but the one specified in mysql.yaml.

minikube service mysql --url

MySQL considerations

Create a user for your database with 'dbuser'@'%' with general scope as you can't guarantee what interal IP you will be connecting from.

CREATE DATABASE dbname;
CREATE USER 'dbuser'@'%' IDENTIFIED BY 'TODO_password';
GRANT ALL PRIVILEGES ON dbname.* TO 'dbuser'@'%';
FLUSH PRIVILEGES;

About

An example NodeJS app with a MySQL persistent storage on Kubernetes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published