OpenShift Pod Operations: Difference between revisions
Jump to navigation
Jump to search
Line 45: | Line 45: | ||
The controller (either [[OpenShift_Concepts#Replication_Controller|replication]] or [[OpenShift_Concepts#DaemonSet|DamonSet]]) will detect that the pod is missing and it will start a new one. | The controller (either [[OpenShift_Concepts#Replication_Controller|replication]] or [[OpenShift_Concepts#DaemonSet|DamonSet]]) will detect that the pod is missing and it will start a new one. | ||
=Evacuate Pod= | |||
=Scaling Down and Up the Number of Replicas associated with a DeploymentConfig= | =Scaling Down and Up the Number of Replicas associated with a DeploymentConfig= | ||
{{Internal|OpenShift_Application_Operations#Scaling_Up_and_Down_the_Number_of_Replicas_associated_with_a_DeploymentConfig|Application Operations - Scaling Up and Down the Number of Replicas associated with a DeploymentConfig}} | {{Internal|OpenShift_Application_Operations#Scaling_Up_and_Down_the_Number_of_Replicas_associated_with_a_DeploymentConfig|Application Operations - Scaling Up and Down the Number of Replicas associated with a DeploymentConfig}} |
Revision as of 04:42, 22 November 2017
External
Internal
List Pods for a Project
oc get projects oc get -n <project-name> pods
List Pods on Nodes
oadm manage-node <node-name> --list-pods
Pod Status
The most complete information set is generated by "oc get -o yaml pod ..." and "oc describe pod ...":
oc [-n <project-name>] [[oc get#pods|get pods] oc [-n <project-name>] -o yaml get pod] <pod-name> oc [-n <project-name>] describe pod <pod-name> oc [-n <project-name>] describe pod/<pod-name> oc [-n <project-name>] edit pod/<pod-name>
Monitor Pod's Logs
oc logs -f <pod-name>
Execute Commands in Containers
oc rsh <pod-id> <command>
Update a Pod Defintion
Stopping Pods
A pod can be stopped by deleting its associated "pod" object:
oc delete pod/logging-fluentd-3kz30
The controller (either replication or DamonSet) will detect that the pod is missing and it will start a new one.