跳至主要內容

K8s运维操作-unable to validate against any pod security policy

HFwask8sk8s约 98 字小于 1 分钟

K8s运维操作-unable to validate against any pod security policy

报错信息

  • 报错名称:unable to validate against any pod security policy: [spec.volumes[1]: Invalid value: "hostPath": hostPath volumes are not allowed to be used]

  • 执行kubectl -n 命名空间 get psp

  • 查看名称为cluster-podsecuritypolicy的psp

  • 执行kubectl -n 命名空间 edit psp cluster-podsecuritypolicy

  • 添加hostpath内容,

image-20230719165833176
image-20230719165833176

参考资料

  • https://github.com/kubecost/cost-analyzer-helm-chart/blob/master/cost-analyzer/templates/cost-analyzer-psp.template.yaml
评论
  • 按正序
  • 按倒序
  • 按热度
Powered by Waline v3.1.3