Oc logs: Difference between revisions
Jump to navigation
Jump to search
Line 9: | Line 9: | ||
=Overview= | =Overview= | ||
Retrieves the log output for a build, deployment or pod | Retrieves the log output for a build, deployment or pod. | ||
< | To retrieve the logs for a lone container running on a pod, use: | ||
oc logs -f <pod> | |||
< | oc logs -f <''pod-name''> | ||
If the pod runs more than one container, the container name must be specified with -c: | |||
oc logs -f <''pod-name''> -c <''container-name''> | |||
Example: | |||
oc logs -f logging-kibana-1-d4bw2 -c kibana-proxy | |||
=Options= | =Options= |
Revision as of 21:06, 5 August 2017
External
Internal
Overview
Retrieves the log output for a build, deployment or pod.
To retrieve the logs for a lone container running on a pod, use:
oc logs -f <pod-name>
If the pod runs more than one container, the container name must be specified with -c:
oc logs -f <pod-name> -c <container-name>
Example:
oc logs -f logging-kibana-1-d4bw2 -c kibana-proxy
Options
-f
Streams the logs, similarly to tail -f.
Sub-Commands
build
oc logs build