在 OpenShift 3 中列出/浏览文件/目录

List / browse files / directories in OpenShift 3

我想查看 OpenShift 3 中的文件夹结构。可以ssh进去吗?我看到用rsync可以复制进/出,但是如何列出内容?

要访问属于您的应用程序 运行 的容器,请使用 oc rsh 命令。这将为您提供交互式 shell,您可以使用普通的 Unix 命令更改目录、列出文件等。

考虑阅读 https://www.openshift.com/promotions/for-developers.html and work through exercises at https://learn.openshift.com 上的免费电子书,了解有关使用 OpenShift 的更多信息。您还可以在 blog.openshift.com

找到各种博客文章

如果您的容器不包含 shell,您也可以直接使用 oc exec 到 运行 命令。特定容器和带有参数的命令的示例(注意双破折号):

oc exec -it POD -c CONTAINER -- ls -lrt /tmp/