Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
docker:openshift [2021/06/08 09:53] – tmadedocker:openshift [2026/04/14 17:08] (current) – tmade
Line 6: Line 6:
   oc completion bash >> .bashrc   oc completion bash >> .bashrc
   oc -ndefault get network/cluster   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
 +  oc delete routes --all -n my-name-space
 +  oc delete dc,pods --all -n my-name-space                        #delete all dc´s and pod´s in ns
 +  oc delete --force=true --grace-period=0 dc $(oc get dc -o custom-columns=NAME:.metadata.name --no-headers | grep -Ev "(jenkins|grafana||prometheus)") -n my-name-space
 + 
docker/openshift.1623138807.txt.gz · Last modified: 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