OpenShift

oc rsh pod-id
oc project
oc project project-id
oc completion bash >> .bashrc
oc -ndefault get network/cluster
oc label dc/apache-test app=apache-test
oc scale --replicas=1 dc -l labelname=value
oc scale --replicas=0 dc -l app.kubernetes.io/component=worker   #scale dc´s by label
oc scale --replicas=0 dc dc-name                                 #scale single dc
oc get pods --selector=app.kubernetes.io/component=worker
oc get pods -l app.kubernetes.io/component=worker
oc get dc | cut -d " " -f1 | xargs -L1 oc rollout latest
oc rollout latest dc/my-deployment-config
oc get rc -o wide | awk '{print $2,$3}'                          #check if all rc´s are correctly started
oc get dc -o wide | awk '{print $3,$4}'                          #check if all dc´s are correctly started
oc get endpoints                                                 #get service endpoints
oc rsh mypod curl -X GET localhost:8080 > /tmp/dump.txt
oc cp --retries 10 my-pod-7-hhtx8:/myfile.jar /tmp/myfile.jar
oc exec $pod -- ps -ef
docker/openshift.txt · Last modified: 2024/05/03 13:39 by tmade
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki