How do i check logs on an openshift container?
amurleopard last edited by
Display the running pods. Pods are essentially a group of containers.
$ oc get pods NAME READY STATUS RESTARTS AGE httpd-ex-1-9cq4t 1/1 Running 0 2d
Display the logs for that container httpd-ex, within the httpd-ex-1-9cq4t pod. The container name can be obtained using "oc describe pod/httpd-ex-1-9cq4t"
$ oc logs httpd-ex-1-9cq4t -c httpd-ex
The pod name followed by -c container name.
© Lightnetics 2020