OpenShift Pod Operations: Difference between revisions
Jump to navigation
Jump to search
Line 27: | Line 27: | ||
oc [-n ''<project-name>''] [[Oc_describe#pod|describe]] pod/''<pod-name>'' | oc [-n ''<project-name>''] [[Oc_describe#pod|describe]] pod/''<pod-name>'' | ||
oc [-n ''<project-name>''] [[Oc_edit#Generic_Syntax|edit]] pod/''<pod-name>'' | oc [-n ''<project-name>''] [[Oc_edit#Generic_Syntax|edit]] pod/''<pod-name>'' | ||
=Monitor Pod's Logs= | |||
oc logs -f <''pod-name''> | |||
=Update a Pod Defintion= | =Update a Pod Defintion= |
Revision as of 17:41, 21 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>
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.