Skip to Content
Learn OpenShift
book

Learn OpenShift

by Denis Zuev, Artemii Kropachev, Aleksey Usov
July 2018
Intermediate to advanced
504 pages
11h 34m
English
Packt Publishing
Content preview from Learn OpenShift

Deploying MariaDB

In this section, we will deploy a database container with additional configuration options. The container requires a number of parameters to be passed to oc new-app. Let's create a simple mariadb container as shown here.

First delete objects created previously:

$ oc delete all --all...<OUTPUT OMITTED>...

Now we want to create a database container where the database user named openshift is allowed to connect to the database named openshift. For simplicity reasons, we will use openshift as the database password. The following example, shows how to start a MariaDB container:

$ oc new-app -e MYSQL_USER=openshift -e MYSQL_PASSWORD=openshift \-e MYSQL_DATABASE=openshift mariadb--> Found image 1b0e3a6 (5 days old) in image stream ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Operating OpenShift

Operating OpenShift

Rick Rackow, Manuel Dewald
OpenShift for Developers, 2nd Edition

OpenShift for Developers, 2nd Edition

Joshua Wood, Brian Tannous
Kubernetes: Up and Running, 2nd Edition

Kubernetes: Up and Running, 2nd Edition

Brendan Burns, Joe Beda, Kelsey Hightower

Publisher Resources

ISBN: 9781788992329Supplemental Content