How can I get AWS secrets into clusters that aren'...
# 🤖|ask-kapa
m
Please stand by @little-army-47606 as I search the knowledge base. I normally take about 20 seconds or so. :wave:
---------------------- To get AWS secrets into clusters that aren't hosted on EKS, you can follow these steps: 1. Create a
config.json
file with the following contents. Replace
<aws_account_id>
and
<region>
with your AWS account ID and region respectively:
Copy code
json
{
  "credHelpers": {
    "<aws_account_id>.dkr.ecr.<region>.amazonaws.com": "ecr-login"
  }
}
2. Create an
imagePullSecret
in your cluster. You can replace the default namespace if necessary, but ensure it's correctly referenced in the configuration:
Copy code
bash
kubectl --namespace default create secret generic ecr-config \
--from-file=.dockerconfigjson=./config.json \
--type=kubernetes.io/dockerconfigjson
3. Add the secret reference to your
kubernetes
provider configuration:
Copy code
yaml
apiVersion: garden.io/v1
kind: Project
name: my-project
...
providers:
- name: kubernetes
...
imagePullSecrets:
- name: ecr-config
namespace: default
Remember to replace
my-project
with your project name, and
ecr-config
with the name of your secret. For more details, you can refer to the Garden documentation () and Garden's guide on configuring a registry (). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------