oc login -u system:admin
oc adm policy add-cluster-role-to-user cluster-admin XXX
Get from https://CLUSTER:8443/console/command-line
the token.
oc login ...
oc new-project xxx --description="XXX" --display-name="xxx xxx xxx"
Launches as pod supervised by DC:
oc new-app --strategy=source IMAGE:TAG~https://github.com/handle/repo.git
# for example:
oc new-app --strategy=source python:2.7~https://github.com/mhausenblas/cwc.git -e APP_FILE=cwc.py -e CWCPORT=8080
oc new-app --strategy=docker --name='$(app_name)' --context-dir='./app/' . --output yaml > app.yaml
oc apply -f app.yaml
oc new-build --strategy=docker --name='xxx' .
oc start-build xxx --from-dir .
oc logs -f bc/xxx
TBD: how to find image?
oc run rs --image=172.30.115.115:5000/go-test/reshifter
oc status
oc logs -f dc/xxx
oc expose dc rs --port=8080
oc expose svc/xxx
oc get routes | grep xxx | awk '{print $2}'
Hit /info
endpoint of the service, using two different methods:
http $(oc get routes | grep xxx | awk '{print $2}')/info
curl -s $(oc get routes | grep xxx | awk '{print $2}')/info | jq .