Openshift - keshavbaweja-git/guides GitHub Wiki
From within a pod, cluster DNS makes the kubernetes API available at https://kubernetes.default.svc:443
# Create an OpenShift application from an image
oc new-app --name=<app-name> --docker-image=<image-name>
# View logs of a pod
oc logs <pod-name>
# Launch a shell inside a pod
oc exec <pod-name> -c <container-name> -ti -- <command>
oc exec <pod-name> -c <container-name> -ti -- sh
# Get all resources
oc get all --selector <label-name>=<label-value>
# Delete all resources
oc delete all --selector <label-name>=<label-value>
# Create a configmap
oc create configmap <configmap-name> --from-file <properties-file-path>
# Create a secret
oc create secret generic <secret-name> \
--from-literal=<key1>='<value1>'