May
23rd,
2019
Just a quick article to show how to spin up a sql server database on Openshift/Minishift and connect to it.
Initially, we need to Create a new project and import the MS SQL Server image.
Once this is done we:
- Create a
secret
in order to hold the mssqlsa
password, in this instance we set this tosqladmin1!
. - Import the mssql-server-template.yml template which sets up the sql server, and
- Create the sql server container from the template
Once the pod is up and running we can forward ports from our machine into the environment with oc
.
Once executed oc
will forward traffic from localhost to the running sql server pod.
Now we should be able to use a DB tool to connect to the database. In this instance I’m using DBeaver Community Edition
Select SQL Server:
Connect with the credentials:
Browse the database:
This is also a great way of running up various databases in an Openshift/Minishift environment without installing a database locally. Enjoy!