如何在本地查看openshift在线节点应用日志?
How to view openshift online node application logs locally?
我可以在 OpenShift Online 界面中查看我的节点应用程序日志:
OpenShift > Applications > Deployments > [ pod_name ] > [ deployment_name ] > Logs
如何在本地查看它们?
首先,获取您的 pods、运行 的列表:
oc get pods
它将return类似于:
NAME READY STATUS RESTARTS AGE
mongodb-24-rtls 1/1 Running 0 45d
showcase-node-501-build 0/1 Completed 0 21h
showcase-node-502-build 0/1 Completed 0 21h
showcase-node-530-wcwzm 1/1 Running 1 21h
要查看节点应用程序的日志屏幕,运行:
oc logs showcase-node-530-wcwzm -f
我可以在 OpenShift Online 界面中查看我的节点应用程序日志:
OpenShift > Applications > Deployments > [ pod_name ] > [ deployment_name ] > Logs
如何在本地查看它们?
首先,获取您的 pods、运行 的列表:
oc get pods
它将return类似于:
NAME READY STATUS RESTARTS AGE
mongodb-24-rtls 1/1 Running 0 45d
showcase-node-501-build 0/1 Completed 0 21h
showcase-node-502-build 0/1 Completed 0 21h
showcase-node-530-wcwzm 1/1 Running 1 21h
要查看节点应用程序的日志屏幕,运行:
oc logs showcase-node-530-wcwzm -f