【发布时间】:2019-11-05 21:51:43
【问题描述】:
我正在尝试从 Google 的示例清单中应用以下 StorageBucket resource:
apiVersion: storage.cnrm.cloud.google.com/v1alpha2
kind: StorageBucket
metadata:
labels:
label-one: "value-one"
name: dmacthedestroyer-hdjkwhekhjewkjeh-storagebucket-sample
spec:
lifecycleRule:
- action:
type: Delete
condition:
age: 7
versioning:
enabled: true
cors:
- origin: ["http://example.appspot.com"]
responseHeader: ["Content-Type"]
method: ["GET", "HEAD", "DELETE"]
maxAgeSeconds: 3600
响应超时并出现以下错误:
$ kubectl apply -f sample.yaml
Error from server (Timeout): error when creating "sample.yaml": Timeout: request did not complete within requested timeout 30s
更新: 由于某些未知原因,错误消息已更改为:
Error from server (InternalError): error when creating "sample.yaml": Internal error occurred: failed calling webhook "cnrm-deny-unknown-fields-webhook.google.com": Post https://cnrm-validating-webhook-service.cnrm-system.svc:443/deny-unknown-fields?timeout=30s: net/http: TLS handshake timeout
我已经在两个不同的网络上对此进行了测试,得到了相同的错误结果。
我使用具有roles/owner 权限的专用服务帐户按照上述说明安装了their documentation 中所述的配置连接器组件。
我已通过此设置成功部署了 IAMServiceAccount 和 IAMServiceAccountKey 资源。
我应该如何解决这个问题?
【问题讨论】:
-
在哪个服务帐户配置控制器上运行/配置(默认服务帐户或自定义服务帐户)?您按照什么程序安装配置连接器 GCP Identity Service Account 或 GKE Workload Identity?此外,在创建身份时,您为配置控制器授予了哪种类型的 IAM 服务帐户权限(例如 --roles/owner 或 --roles/editor)?
-
正如@Milad 所说,你的集群配置是什么?
-
我用该信息更新了我的问题,感谢您提出的有用问题。我正在使用具有所有者权限的自定义 GCP 服务帐户,如安装指南中所述
-
我只是想检查一下,您实际上并没有尝试创建名称为
storagebucket-sample的StorageBucket,它已被采用(并且存储桶名称必须是全局唯一的)。 -
更新了我的问题——谢谢。实际上,存储桶名称似乎无关紧要——无论如何都会发生超时。
标签: kubernetes google-cloud-platform google-kubernetes-engine