如何在Openshift中使用hostPath

使用openshift搭建的k8s的api创建Deployment,在启动的时候报下面的错误:

Invalid value: “hostPath”: hostPath volumes are not allowed to be used]

解决方案:

一个方案是将user加入privileged scc中,另一个方案就是:

oc edit scc restricted
#添加下面这行
allowHostDirVolumePlugin: true
posted @ 2020-06-22 19:06  Oops!#  阅读(670)  评论(0编辑  收藏  举报