Login:
Shell
x
1
1
oc login <urlWithToken>
Select project/namespace:
Shell
1
1
1
oc project <projectname>
Get all pods in a project
Shell
1
1
1
oc get pods
Port Forward a pod to localhost
Shell
1
1
1
oc port-forward <pod>
View logs of a pod
Shell
1
1
1
oc logs <pod>
Show status of a current project
Shell
1
1
1
oc status
Add users to namespace/project
Shell
1
1
1
oc adm policy add-role-to-group edit ocp_devs -n <project-namespace>
Copy File To Pod/Container
Shell
1
1
1
oc rsync <source> <destination>
Import Images to OpenShift
Shell
1
1
1
oc import-image <image> --from=<docker.example.com/org/image> --confirm
Image Stream Triggers (Mitch Murphey)
Shell
1
3
1
oc import-image <org>/<image>:<tag> --from=<docker.example.com/org/image> --confirm
2
oc new-app --docker-image=<org>/<image>:<tag>
3
oc set triggers dc/<image> --from-image=<org>/<image>:<tag> --auto=True -c=<image>
Link builder secrets (env)
Shell
1
1
1
oc secrets link builder openshift-private-ssh
Shell
1
1
1
oc new-app nodejs~git@gitlab.agilesof.com:esof/esof-fe-clientside.git --source-secret openshift-private-ssh --name fe-clientside