Deploying Containerized Applications on Openshift Flashcards

1
Q

Basic Command to create an application

A

oc new-app mysql MYSQL_USER=user \ MYSQL_PASSWORD=pass MYSQL_DATABASE=testdb \
-l db=mysql

oc new-app –docker-image=myregistry.com/mycompany/myapp –name=myapp

oc new-app https://github.com/openshift/ruby-hello-world –name=ruby-hello

oc new-app \
–template=mysql-persistent \
-p MYSQL_USER=user1 \
-p MYSQL_PASSWORD=mypa55 \
-p MYSQL_DATABASE=testdb \
-p MYSQL_ROOT_PASSWORD=r00tpa55 \
-p VOLUME_CAPACITY=10Gi

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Managing Persistent Storage

A

oc get pv

oc get pv pv0001 -o yaml

To add PersistentVolume

oc create -f pv1001.yaml

To define persistent volume claims

oc create -f pvc.yaml

oc get pvc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Managing Openshift Resources CLI

A

oc get all

oc describe <resource-name></resource-name>

oc get <resource-name></resource-name>

oc create

oc delete

oc exec <container-id></container-id>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly