如何在PVC工作时部署EFS-Provisioner

时间:2019-07-17 14:54:51

标签: amazon-web-services kubernetes cloud eks

我已经按照efs-provisioner中概述的步骤成功部署了efs-provisioner

enter image description here

但是PVC挂在Pending状态,显示相同的消息:

waiting for a volume to be created, either by external provisioner "example.com/aws-efs" or manually created by system administrator

enter image description here

PVC不能正确创建的原因可能是什么?

1 个答案:

答案 0 :(得分:1)

该解决方案由ParaSwarm发布,here

  

“ ...快速解决方案是将cluster-admin角色赋予默认服务帐户。当然,这取决于您的环境和   安全性,您可能需要更详尽的修复。如果您选择去   简单的方法,您只需应用以下命令即可:“

apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  name: default-admin-rbac (or whatever)
subjects:
  - kind: ServiceAccount
    name: default
    namespace: default
roleRef:
  kind: ClusterRole
  name: cluster-admin
  apiGroup: rbac.authorization.k8s.io