【问题标题】:openshift origin - using dynamic ebs volumesopenshift origin - 使用动态 ebs 卷
【发布时间】:2017-11-14 16:06:36
【问题描述】:

我在 AWS 中运行 openshift origin 3.6 (kube v1.6.1+5115d708d7)。 Ansible 清单包含云提供商配置,我可以在主节点上看到配置文件。

   # From inventory
   # AWS
   openshift_cloudprovider_kind=aws
   openshift_cloudprovider_aws_access_key="{{ lookup('env','AWS_ACCESS_KEY_ID') }}"
   openshift_cloudprovider_aws_secret_key="{{ lookup('env','AWS_SECRET_ACCESS_KEY') }}"

我还提供了一个存储类

   # oc get storageclass
   NAME             TYPE
   fast (default)   kubernetes.io/aws-ebs

但是,当我尝试创建 pvc 时:

    kind: "PersistentVolumeClaim"
    apiVersion: "v1"
    metadata:
      name: "testclaim"
      namespace: testns
    spec:
      accessModes:
        - "ReadWriteOnce"
      resources:
        requests:
          storage: "3Gi"
      storageClassName: fast

它只是进入无限循环试图创建 pvc。事件向我显示此错误:

   (combined from similar events): Failed to provision volume with StorageClass "fast": UnauthorizedOperation: You are not authorized to perform this operation. Encoded authorization failure message: $(encoded-message) status code: 403, request id: d0742e84-a2e1-4bfd-b642-c6f1a61ddc1b

不幸的是,我无法使用 aws cli 解码编码的消息,因为它会出错。

   aws sts decode-authorization-message -–encoded-message $(encoded-message) 
   Error: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal

我没有尝试创建 pv+pvc,因为我正在寻找动态配置。关于我可能做错了什么的任何指导。

到目前为止,我已经能够部署 pod、服务等,而且它们似乎工作正常。

【问题讨论】:

标签: amazon-web-services openshift-origin


【解决方案1】:

该错误似乎是 AWS IAM 错误:

未经授权的操作

您无权执行此操作。检查您的 IAM 策略,并确保您使用正确的访问密钥。为了 更多信息,请参阅控制访问。如果返回的消息是 编码,您可以使用 DecodeAuthorizationMessage 对其进行解码 行动。有关详细信息,请参阅 DecodeAuthorizationMessage AWS 安全令牌服务 API 参考。

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html#CommonErrors

您需要创建适当的 IAM 策略:http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ExamplePolicies_EC2.html#iam-example-manage-volumes

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-12-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-06-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多