MinIO AWS CLI via nginx-ingress controller

8/19/2019

Running MinIO (https://docs.min.io/) on kubernetes 1.12. I am unable to run aws cli commands via nginx-ingress. Commands work fine when port-forwarding directly to the kubernetes service.

Tried

 proxy_set_header Host $http_host;

and

 more_set_input_headers 'Host: minio:9000';

nginx rules but with no luck.

Example request:

aws s3 ls --endpoint-url https://my-endpoint-url.com --profile=minio

Unable to list bucket content. Instead receive error:

An error occurred (SignatureDoesNotMatch) when calling the ListBuckets operation: The request signature we calculated does not match the signature you provided. Check your key and signing method.

-- David H.
kubernetes
minio

1 Answer

8/19/2019

This turned about to be an issue w/ a rewrite. (Broke presigned URLs.)

nginx.ingress.kubernetes.io/rewrite-target: /mybucket/$1

Removing the rewrite, and modifying the path in the request, fixed the issue.

-- David H.
Source: StackOverflow