OC进行部署正在返回找不到资源
“ oc进行部署 “命令正在返回” 结果找不到资源“结果”。
即使我使用-n作为上述命令的选项进行分配或定义命名空间的选项,我也会得到相同的结果。
鉴于,我得到的是 oc获取Pods 命令的正确结果。
同时,OC版本是 OC -v3.6.0 Kubernetes -v1.6.1
OpenShift -v3.11.380
"oc get deployment" command is returning "No resources Found" as the result.
Even if I put an option of assigning or defining the namespace using -n as the option to above command, I am getting the same result.
Whereas, I am getting the correct result of oc get pods command.
Meanwhile, the oc version is
oc - v3.6.0
kubernetes - v1.6.1
openshift - v3.11.380
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查,如果您连接到正确的Kubernetes环境(尤其是运行多个)。
我想,如果这是正确的,则您根本没有任何部署,或者部署的名称空间与您想象的不同。
尝试列出所有部署:
OC进行部署-A
Check, if you connect to the correct kubernetes environment, (especially if you're running more than one).
If that is correct, I guess, either you don't have any deployments at all, or the deployments are in a different namespace than you think.
Try out listing all deployments:
oc get deployments -A
还有其他对象创建POD,例如
statefulset
或deamonset
。因为它是OpenShift,所以我的感觉是由deploymentConfig
创建的POD是创建应用程序的流行方式。无论如何,您可以通过查看POD注释来确保哪个对象是POD的所有者。此命令应起作用:
There are other objects that create pods such as
statefulset
ordeamonset
. Because it is OpenShift, my feeling is that the pods created by adeploymentconfig
which is popular way to create applications.Anyway, you can make sure which object is the owner of the pods by looking into the pod annotation. This command should work: