Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

403 Access Denied while pulling registry.k8s.io/kube-state-metrics in eu-central-1 on AWS #4214

Closed
ritvikgautam opened this issue Sep 14, 2022 · 16 comments
Labels
sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra.

Comments

@ritvikgautam
Copy link

We are getting a 403 Access Denied message when trying to pull registry.k8s.io/kube-state-metrics/kube-state-metrics in eu-central-1 (Frankfurt) on AWS.

# docker pull registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.5.0
v2.5.0: Pulling from kube-state-metrics/kube-state-metrics
36698cfa5275: Pulling fs layer
c770874a9c13: Pulling fs layer
error pulling image configuration: error parsing HTTP 403 response body: invalid character '<' looking for beginning of value: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>//REDACTED//</RequestId><HostId>//REDACTED//</HostId></Error>"

# docker pull registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.6.0
v2.6.0: Pulling from kube-state-metrics/kube-state-metrics
0a602d5f6ca3: Pulling fs layer
68ad17e1eab7: Pulling fs layer
error pulling image configuration: error parsing HTTP 403 response body: invalid character '<' looking for beginning of value: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>//REDACTED//</RequestId><HostId>//REDACTED//</HostId></Error>"

We are facing this issue only in eu-central-1, it works fine in 5 other regions on AWS with the same configurations.

From this doc, I understand our request to pull this image originating from eu-central-1 on AWS could be getting redirected to a nearby repository. This would explain why we're facing this only in this particular region on AWS. (Sorry if this isn't the right place to report this)

Also referencing the issue opened at kube-state-metrics: prometheus-community/helm-charts#2421

@ritvikgautam ritvikgautam added the sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra. label Sep 14, 2022
@ameukam
Copy link
Member

ameukam commented Sep 14, 2022

cc @BenTheElder @BobyMCbobs

@BenTheElder
Copy link
Member

I'm on mobile, but the first thing we should check is if the regional s3 bucket is correctly configured (which I don't have access to)

@BenTheElder
Copy link
Member

Thank you for the report. This is a good place to report this.

@riaankleinhans
Copy link
Contributor

riaankleinhans commented Sep 14, 2022

Working on it
#4118 (comment)

@BenTheElder
Copy link
Member

@Riaankl #4118 seems to be about writing to the bucket / replication, but this is about reading? What am I missing?

FWIW without auth I ran:

crane pull --verbose registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.6.0 /dev/null

This gave me GCP-only hosting as I'm not in AWS, but it allowed me to see what layers are used for this image.

Then manually downloading a layer from one of the current implementation detail buckets, the one we should be seeing for eu-central-1 users:

curl https://prod-registry-k8s-io-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/containers/images/sha256:68ad17e1eab7fdb4ef2e7eb00885d2b12aeaf8365095eaf7e37e8cb22e4bda27 >/dev/null
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10.6M  100 10.6M    0     0  3706k      0  0:00:02  0:00:02 --:--:-- 3713k

With no auth issue 🤔

registry.k8s.io should not require authentication ... 🤔

@ritvikgautam would it be possible for you to run the crane command in this environment and share the output?

The docker error message above unfortunately doesn't tell us what endpoint served this error, though based on:

"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>//REDACTED//</RequestId><HostId>//REDACTED//</HostId></Error>"

It appears to be one of the S3 buckets.

@riaankleinhans
Copy link
Contributor

@BenTheElder , my bad. Was refering to Caleb's comment in the PR about the 403 issue, not the PR it self.

@BobyMCbobs
Copy link
Member

Working on it #4118 (comment)

This is not related.

@BenTheElder
Copy link
Member

BenTheElder commented Sep 14, 2022

There are only 3 content digests in this image (two layers and the config), all of them fetch fine without auth from the eu-central-1 bucket fetching directly.

Given:

error pulling image configuration:

It should have been while trying to fetch ec6e2d871c544073e0d0a2448b23f98a1aa47b7c60ae9d79ac5d94d92ea45949, the config layer.

But that fetches fine locally with curl unauthenticated. All three should be going through the same API flow and redirects.

This is the manifest:

{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
   "config": {
      "mediaType": "application/vnd.docker.container.image.v1+json",
      "size": 2228,
      "digest": "sha256:ec6e2d871c544073e0d0a2448b23f98a1aa47b7c60ae9d79ac5d94d92ea45949"
   },
   "layers": [
      {
         "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
         "size": 801012,
         "digest": "sha256:0a602d5f6ca3de9b0e0d4d64e8857e504ec7a8c47f1ec617d82a81f6c64b0fe8"
      },
      {
         "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
         "size": 11156867,
         "digest": "sha256:68ad17e1eab7fdb4ef2e7eb00885d2b12aeaf8365095eaf7e37e8cb22e4bda27"
      }
   ]
}

@BobyMCbobs maybe worth running through https://aws.amazon.com/premiumsupport/knowledge-center/s3-troubleshoot-403/

That object should be https://prod-registry-k8s-io-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/containers/images/sha256:ec6e2d871c544073e0d0a2448b23f98a1aa47b7c60ae9d79ac5d94d92ea45949, though it happened on more than one image in the OP.

@BobyMCbobs
Copy link
Member

BobyMCbobs commented Sep 14, 2022

This is peculiar to me. The HEAD check should defer to k8s.gcr.io, given the lack of a particular blob.

Separately, I am just now performing a manual sync now to ensure that everything is up to date.
Automated S3 syncing should now be in-place, through the replication configurations.

@BenTheElder
Copy link
Member

The HEAD check should defer to GCP, given the lack of a particular blob.

GET and HEAD are proxied identically.
The blob appears to be available in the bucket, so oci-proxy should be redirecting both to the bucket.

AFAICT if we are getting a 403 it's an auth restriction somewhere in AWS. It shouldn't be any of the GCR fallbacks, you can hit them all with no auth and I can't find evidence that anything changed there.

@ritvikgautam
Copy link
Author

@BenTheElder Here's the output of the crane command from the environment:

# ./crane pull --verbose registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.6.0 /dev/null
2022/09/14 22:16:26 --> GET https://registry.k8s.io/v2/
2022/09/14 22:16:26 GET /v2/ HTTP/1.1
Host: registry.k8s.io
User-Agent: crane/0.11.0 go-containerregistry/0.11.0
Accept-Encoding: gzip


2022/09/14 22:16:26 <-- 200 https://registry.k8s.io/v2/ (41.688275ms)
2022/09/14 22:16:26 HTTP/2.0 200 OK
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Content-Type: text/html
Date: Wed, 14 Sep 2022 22:16:26 GMT
Docker-Distribution-Api-Version: registry/2.0
Server: Google Frontend
Via: 1.1 google
X-Cloud-Trace-Context: e8c470f777fed906ccff11da8e21a1b2
Content-Length: 0


2022/09/14 22:16:26 --> GET https://registry.k8s.io/v2/kube-state-metrics/kube-state-metrics/manifests/v2.6.0
2022/09/14 22:16:26 GET /v2/kube-state-metrics/kube-state-metrics/manifests/v2.6.0 HTTP/1.1
Host: registry.k8s.io
User-Agent: crane/0.11.0 go-containerregistry/0.11.0
Accept: application/vnd.docker.distribution.manifest.v1+json,application/vnd.docker.distribution.manifest.v1+prettyjws,application/vnd.docker.distribution.manifest.v2+json,application/vnd.oci.image.manifest.v1+json,application/vnd.docker.distribution.manifest.list.v2+json,application/vnd.oci.image.index.v1+json
Accept-Encoding: gzip


2022/09/14 22:16:26 <-- 307 https://registry.k8s.io/v2/kube-state-metrics/kube-state-metrics/manifests/v2.6.0 (10.425771ms)
2022/09/14 22:16:26 HTTP/2.0 307 Temporary Redirect
Content-Length: 112
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Content-Type: text/html; charset=utf-8
Date: Wed, 14 Sep 2022 22:16:26 GMT
Location: https://k8s.gcr.io/v2/kube-state-metrics/kube-state-metrics/manifests/v2.6.0
Server: Google Frontend
Via: 1.1 google
X-Cloud-Trace-Context: 51339b994deb4e80b8b560e4ea2e476a

<a href="https://k8s.gcr.io/v2/kube-state-metrics/kube-state-metrics/manifests/v2.6.0">Temporary Redirect</a>.


2022/09/14 22:16:26 --> GET https://k8s.gcr.io/v2/kube-state-metrics/kube-state-metrics/manifests/v2.6.0
2022/09/14 22:16:26 GET /v2/kube-state-metrics/kube-state-metrics/manifests/v2.6.0 HTTP/1.1
Host: k8s.gcr.io
User-Agent: crane/0.11.0 go-containerregistry/0.11.0
Accept: application/vnd.docker.distribution.manifest.v1+json,application/vnd.docker.distribution.manifest.v1+prettyjws,application/vnd.docker.distribution.manifest.v2+json,application/vnd.oci.image.manifest.v1+json,application/vnd.docker.distribution.manifest.list.v2+json,application/vnd.oci.image.index.v1+json
Referer: https://registry.k8s.io/v2/kube-state-metrics/kube-state-metrics/manifests/v2.6.0
Accept-Encoding: gzip


2022/09/14 22:16:26 <-- 200 https://k8s.gcr.io/v2/kube-state-metrics/kube-state-metrics/manifests/v2.6.0 (261.589222ms)
2022/09/14 22:16:26 HTTP/2.0 200 OK
Content-Length: 1665
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Content-Type: application/vnd.docker.distribution.manifest.list.v2+json
Date: Wed, 14 Sep 2022 22:16:26 GMT
Docker-Content-Digest: sha256:bdab4e49d71d272cf944c8612dff5ab1250f0fafdae45c22980286ac0c016032
Docker-Distribution-Api-Version: registry/2.0
Server: Docker Registry
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0

{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 739,
         "digest": "sha256:132efcf4b7c523f9f478f2662ccd828313e24d0f126454e29f1e9a29b8c474a0",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 739,
         "digest": "sha256:f6f2d2b550daa16e22f4989892bf9e6bc0be936da88bbb19debc504d6bcfeba4",
         "platform": {
            "architecture": "arm",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 739,
         "digest": "sha256:cf5ff4dd35303519f5befe6ab763aca05620694059a5ae01d2f1e1403d527d5d",
         "platform": {
            "architecture": "arm64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 738,
         "digest": "sha256:35f507c0cd2ff1a11e5cfdf307dc8286bd75f7b55a647aca977b206f66c51da7",
         "platform": {
            "architecture": "ppc64le",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 739,
         "digest": "sha256:9899d801768ed48e9ff7d5fe43f39f7f14a534898370badcea371b16cc53ec5c",
         "platform": {
            "architecture": "s390x",
            "os": "linux"
         }
      }
   ]
}
2022/09/14 22:16:26 --> GET https://registry.k8s.io/v2/kube-state-metrics/kube-state-metrics/manifests/sha256:132efcf4b7c523f9f478f2662ccd828313e24d0f126454e29f1e9a29b8c474a0
2022/09/14 22:16:26 GET /v2/kube-state-metrics/kube-state-metrics/manifests/sha256:132efcf4b7c523f9f478f2662ccd828313e24d0f126454e29f1e9a29b8c474a0 HTTP/1.1
Host: registry.k8s.io
User-Agent: crane/0.11.0 go-containerregistry/0.11.0
Accept: application/vnd.docker.distribution.manifest.v2+json
Accept-Encoding: gzip


2022/09/14 22:16:26 <-- 307 https://registry.k8s.io/v2/kube-state-metrics/kube-state-metrics/manifests/sha256:132efcf4b7c523f9f478f2662ccd828313e24d0f126454e29f1e9a29b8c474a0 (10.238706ms)
2022/09/14 22:16:26 HTTP/2.0 307 Temporary Redirect
Content-Length: 177
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Content-Type: text/html; charset=utf-8
Date: Wed, 14 Sep 2022 22:16:26 GMT
Location: https://k8s.gcr.io/v2/kube-state-metrics/kube-state-metrics/manifests/sha256:132efcf4b7c523f9f478f2662ccd828313e24d0f126454e29f1e9a29b8c474a0
Server: Google Frontend
Via: 1.1 google
X-Cloud-Trace-Context: 262fd4a806280a28465958471378834f

<a href="https://k8s.gcr.io/v2/kube-state-metrics/kube-state-metrics/manifests/sha256:132efcf4b7c523f9f478f2662ccd828313e24d0f126454e29f1e9a29b8c474a0">Temporary Redirect</a>.


2022/09/14 22:16:26 --> GET https://k8s.gcr.io/v2/kube-state-metrics/kube-state-metrics/manifests/sha256:132efcf4b7c523f9f478f2662ccd828313e24d0f126454e29f1e9a29b8c474a0
2022/09/14 22:16:26 GET /v2/kube-state-metrics/kube-state-metrics/manifests/sha256:132efcf4b7c523f9f478f2662ccd828313e24d0f126454e29f1e9a29b8c474a0 HTTP/1.1
Host: k8s.gcr.io
User-Agent: crane/0.11.0 go-containerregistry/0.11.0
Accept: application/vnd.docker.distribution.manifest.v2+json
Referer: https://registry.k8s.io/v2/kube-state-metrics/kube-state-metrics/manifests/sha256:132efcf4b7c523f9f478f2662ccd828313e24d0f126454e29f1e9a29b8c474a0
Accept-Encoding: gzip


2022/09/14 22:16:26 <-- 200 https://k8s.gcr.io/v2/kube-state-metrics/kube-state-metrics/manifests/sha256:132efcf4b7c523f9f478f2662ccd828313e24d0f126454e29f1e9a29b8c474a0 (232.531757ms)
2022/09/14 22:16:26 HTTP/2.0 200 OK
Content-Length: 739
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Content-Type: application/vnd.docker.distribution.manifest.v2+json
Date: Wed, 14 Sep 2022 22:16:26 GMT
Docker-Content-Digest: sha256:132efcf4b7c523f9f478f2662ccd828313e24d0f126454e29f1e9a29b8c474a0
Docker-Distribution-Api-Version: registry/2.0
Server: Docker Registry
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0

{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
   "config": {
      "mediaType": "application/vnd.docker.container.image.v1+json",
      "size": 2228,
      "digest": "sha256:ec6e2d871c544073e0d0a2448b23f98a1aa47b7c60ae9d79ac5d94d92ea45949"
   },
   "layers": [
      {
         "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
         "size": 801012,
         "digest": "sha256:0a602d5f6ca3de9b0e0d4d64e8857e504ec7a8c47f1ec617d82a81f6c64b0fe8"
      },
      {
         "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
         "size": 11156867,
         "digest": "sha256:68ad17e1eab7fdb4ef2e7eb00885d2b12aeaf8365095eaf7e37e8cb22e4bda27"
      }
   ]
}
2022/09/14 22:16:26 --> GET https://registry.k8s.io/v2/kube-state-metrics/kube-state-metrics/blobs/sha256:ec6e2d871c544073e0d0a2448b23f98a1aa47b7c60ae9d79ac5d94d92ea45949
2022/09/14 22:16:26 GET /v2/kube-state-metrics/kube-state-metrics/blobs/sha256:ec6e2d871c544073e0d0a2448b23f98a1aa47b7c60ae9d79ac5d94d92ea45949 HTTP/1.1
Host: registry.k8s.io
User-Agent: crane/0.11.0 go-containerregistry/0.11.0
Accept-Encoding: gzip


2022/09/14 22:16:26 <-- 307 https://registry.k8s.io/v2/kube-state-metrics/kube-state-metrics/blobs/sha256:ec6e2d871c544073e0d0a2448b23f98a1aa47b7c60ae9d79ac5d94d92ea45949 (10.168553ms)
2022/09/14 22:16:26 HTTP/2.0 307 Temporary Redirect
Content-Length: 209
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Content-Type: text/html; charset=utf-8
Date: Wed, 14 Sep 2022 22:16:26 GMT
Location: https://prod-registry-k8s-io-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/containers/images/sha256%3Aec6e2d871c544073e0d0a2448b23f98a1aa47b7c60ae9d79ac5d94d92ea45949
Server: Google Frontend
Via: 1.1 google
X-Cloud-Trace-Context: d175ec761e8cfa28f0807313d4b4afa6

<a href="https://prod-registry-k8s-io-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/containers/images/sha256%3Aec6e2d871c544073e0d0a2448b23f98a1aa47b7c60ae9d79ac5d94d92ea45949">Temporary Redirect</a>.


2022/09/14 22:16:26 --> GET https://prod-registry-k8s-io-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/containers/images/sha256%3Aec6e2d871c544073e0d0a2448b23f98a1aa47b7c60ae9d79ac5d94d92ea45949
2022/09/14 22:16:26 GET /containers/images/sha256%3Aec6e2d871c544073e0d0a2448b23f98a1aa47b7c60ae9d79ac5d94d92ea45949 HTTP/1.1
Host: prod-registry-k8s-io-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com
User-Agent: crane/0.11.0 go-containerregistry/0.11.0
Referer: https://registry.k8s.io/v2/kube-state-metrics/kube-state-metrics/blobs/sha256:ec6e2d871c544073e0d0a2448b23f98a1aa47b7c60ae9d79ac5d94d92ea45949
Accept-Encoding: gzip


2022/09/14 22:16:27 <-- 403 https://prod-registry-k8s-io-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/containers/images/sha256%3Aec6e2d871c544073e0d0a2448b23f98a1aa47b7c60ae9d79ac5d94d92ea45949 (30.407147ms)
2022/09/14 22:16:27 HTTP/1.1 403 Forbidden
Transfer-Encoding: chunked
Content-Type: application/xml
Date: Wed, 14 Sep 2022 22:16:26 GMT
Server: AmazonS3
X-Amz-Id-2: QyyTc07Se5ZsrDSyy2vV0wTneKm8fjl5oweMFO8TeGQV7AWipxDZofwzNTB4hX2wgq2yqf51MkE=
X-Amz-Request-Id: J56NZY7X30W6HTAJ

f3
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>//REDACTED//</RequestId><HostId>//REDACTED//</HostId></Error>
0


Error: saving tarball /dev/null: unable to calculate manifest: GET https://prod-registry-k8s-io-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/containers/images/sha256%3Aec6e2d871c544073e0d0a2448b23f98a1aa47b7c60ae9d79ac5d94d92ea45949: unexpected status code 403 Forbidden: <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>//REDACTED//</RequestId><HostId>//REDACTED//</HostId></Error>

@BenTheElder
Copy link
Member

Thank you!

This is very strange ...

curl https://prod-registry-k8s-io-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/containers/images/sha256%3Aec6e2d871c544073e0d0a2448b23f98a1aa47b7c60ae9d79ac5d94d92ea45949
{"architecture":"amd64","config":{"Hostname":"","Domainname":"","User":"nobody","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"ExposedPorts":{"8080/tcp":{},"8081/tcp":{}},"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt"],"Cmd":null,"Image":"sha256:d35e7be12f94022e0c53d095efb1b646847a5720f04815320d3aac51e20a25da","Volumes":null,"WorkingDir":"/","Entrypoint":["/kube-state-metrics","--port=8080","--telemetry-port=8081"],"OnBuild":null,"Labels":null},"container":"51d40723584de5ff7fa1697a90ca9752e490fbcd5f4148124ee150c7098fef73","container_config":{"Hostname":"51d40723584d","Domainname":"","User":"nobody","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"ExposedPorts":{"8080/tcp":{},"8081/tcp":{}},"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt"],"Cmd":["/bin/sh","-c","#(nop) ","EXPOSE 8080 8081"],"Image":"sha256:d35e7be12f94022e0c53d095efb1b646847a5720f04815320d3aac51e20a25da","Volumes":null,"WorkingDir":"/","Entrypoint":["/kube-state-metrics","--port=8080","--telemetry-port=8081"],"OnBuild":null,"Labels":{}},"created":"2022-08-24T16:44:22.744035043Z","docker_version":"20.10.17","history":[{"created":"1970-01-01T00:00:00Z","author":"Bazel","created_by":"bazel build ..."},{"created":"2022-08-24T16:44:21.805033518Z","created_by":"/bin/sh -c #(nop) COPY file:6fa688f274e1c78ca58b46ab2cb9ab7d4b208aa3f8380a30dcfcdc29ea267ab7 in / "},{"created":"2022-08-24T16:44:22.481603829Z","created_by":"/bin/sh -c #(nop)  USER nobody","empty_layer":true},{"created":"2022-08-24T16:44:22.615739065Z","created_by":"/bin/sh -c #(nop)  ENTRYPOINT [\"/kube-state-metrics\" \"--port=8080\" \"--telemetry-port=8081\"]","empty_layer":true},{"created":"2022-08-24T16:44:22.744035043Z","created_by":"/bin/sh -c #(nop)  EXPOSE 8080 8081","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:c456571abc85581a0ac79dbfe2b13d71d8049c24042db7be14838a55499e4ffd","sha256:c0024e78de05f4a736c74b5df94a8b030f03376bb7551c9fe9e56e9c51eebe45"]}}

Curling works as expected, and your client is even able to download the layers it seems, but not this config blob for some reason.

@BenTheElder
Copy link
Member

It seems like this has to either be an ACL issue on the s3 bucket, or something on that AWS account / environment maybe (?)
It's clearly receiving 403 hitting S3 for this particular blob in the crane logs above.

@ritvikgautam
Copy link
Author

I think this is potentially an environment related issue.

I just tried this on a non-company AWS account in eu-central-1 and I'm able to run the curl call and download the docker image just fine. But it consistently fails on four different company AWS accounts. It's pretty weird because I only face this in one particular region.

I don't think there is any proxy or firewall at the instance level, but there could be policies defined at the VPC level. I'll have to check with other folks to confirm this tomorrow. I'll update here when I have the confirmation.

Big thanks to all for jumping into this and helping out to pinpoint the cause! Sorry for the false alarm.

@BenTheElder
Copy link
Member

Please let us know if you have reason to suspect it's not a company policy and instead an upstream bug 😅
/close

@k8s-ci-robot
Copy link
Contributor

@BenTheElder: Closing this issue.

In response to this:

Please let us know if you have reason to suspect it's not a company policy and instead an upstream bug 😅
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra.
Projects
None yet
Development

No branches or pull requests

6 participants