GKE Config Connector StorageBucket resource times out on kubectl apply

11/5/2019

I'm trying to apply the following StorageBucket resource from Google's sample manifest:

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

The response times out with the following errors:

$ kubectl apply -f sample.yaml
Error from server (Timeout): error when creating "sample.yaml": Timeout: request did not complete within requested timeout 30s

UPDATE: For some unknown reason, the error message has changed to this:

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

I've tested this on two different networks, with the same error result.

I installed the Config Connector components as described in their documentation, using a dedicated service account with the roles/owner permissions, exactly as stated in the above instructions.

I have successfully deployed IAMServiceAccount and IAMServiceAccountKey resources with this setup.

How should I proceed to troubleshoot this?

-- DMac the Destroyer
google-cloud-platform
google-kubernetes-engine
kubernetes

1 Answer

11/7/2019

My issue was due to an incorrect service account configuration.

In particular, I was assigning the owner role to a different project.

After properly configuring my service account, the timeout errors are resolved.

-- DMac the Destroyer
Source: StackOverflow