如何在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

猜你喜欢

转载自www.cnblogs.com/weifeng1463/p/13178558.html
今日推荐