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
secretin order to hold the mssql
sapassword, in this instance we set this to
- 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 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!