Usage of oc
command
$ oc <command>
Logging in to a Cluster
$ oc login <clusterUrl>
oc new-app --docker-image=registry.access.redhat.com/rhscl/mysql-57-rhel7:lastest \
--name=mysql-openshift -e MYSQL_USER=user1 -e MYSQL_PASSWORD=mypa55 \
-e MYSQL_DATABASE=testdb -e MYSQL_ROOT_PASSWORD=r00tpa55
$ oc expose service quotedb --name quote
$ oc get pod --all-namespaces -l app=router
NAMESPACE NAME READY STATUS RESTARTS AGE
openshift-ingress router-default-746b5cfb65 1/1 Running 1 4d
Use oc describe pod
command to get the routing configuration details:
$ oc get pod router-default-746b5cfb65
Name: router--default-746b5cfb65-f6sdm
Namespace: openshift-ingress
...output omitted...
Containers:
router:
...output omitted...
Environment:
STATS_PORT: 1936
ROUTER_SERVICE_NAMESPACE: openshift-ingress
DEFAULT_CERTIFICATE_DIR: /etc/pki/tls/private
ROUTER_SERVICE_NAME: default
ROUTER_CANONICAL_HOSTNAME: apps.cluster.lab.example.com
...output omitted...