ecr-credential-provider
| |
Fork of cmd/ecr-credential-provider to provide public available sources for binary download.
Cobebase will remain in-sync with parent repo but in here we provide building binary for multiple OS and archs.
How to Use
Kubernetes Docs Ref: https://kubernetes.io/docs/tasks/administer-cluster/kubelet-credential-provider/
- Put
ecr-credential-provider
binary at a given destination (/usr/bin/) after trailing OS/arch suffixes:
$ wget https://github.com/dntosas/ecr-credential-provider/releases/download/v1.0.0/ecr-credential-provider-linux-amd64
$ mv ecr-credential-provider-linux-amd64 /usr/bin/ecr-credential-provider
- Create a Kubelet creds config (/etc/smth/kubelet-creds.yaml)
apiVersion: kubelet.config.k8s.io/v1
kind: CredentialProviderConfig
providers:
- name: ecr-credential-provider
matchImages:
- "*.dkr.ecr.*.amazonaws.com"
- "*.dkr.ecr.*.amazonaws.com.cn"
- "*.dkr.ecr-fips.*.amazonaws.com"
- "*.dkr.ecr.*.c2s.ic.gov"
- "*.dkr.ecr.*.sc2s.sgov.gov"
- "public.ecr.aws"
defaultCacheDuration: "12h"
apiVersion: credentialprovider.kubelet.k8s.io/v1
- Add Kubelet flags to utilize above configuration:
$ kubelet [..] \
--image-credential-provider-config='/etc/smth/kubelet-creds.yaml'
--image-credential-provider-bin-dir='/usr/bin'