Created
October 5, 2022 06:39
-
-
Save JoooostB/fd8a470df3d77e1fe19df195cb5df2ed to your computer and use it in GitHub Desktop.
ExternalSecret to create Docker Hub- or any other imagePullSecret from AWS Secret Manager
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: external-secrets.io/v1beta1 | |
kind: ExternalSecret | |
metadata: | |
name: es-docker-hub-token | |
spec: | |
data: | |
- remoteRef: | |
key: /eks/docker-hub-token | |
secretKey: token | |
refreshInterval: 1h | |
secretStoreRef: | |
kind: ClusterSecretStore | |
name: test | |
target: | |
name: docker-hub-token | |
template: | |
data: | |
.dockerconfigjson: '{{ .token | toString }}' | |
engineVersion: v2 | |
type: kubernetes.io/dockerconfigjson |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First, generate a
base64
encoded string from your username and password or token combination:Then, create a secret in AWS Secret Manager in the following format:
If you're configuring the secret for another container registry than Docker Hub, make sure to modify the URL in the json above.