Is it possible to load AWS SSM ARN in Init container and use in the main container

10/15/2020

How to pass AWS SSM ARN or Access Key and Secret as env variables in init container and then pass the SSM parameters to main container.

-- Manasa
amazon-web-services
kubernetes

1 Answer

10/15/2020

You're looking for a solution like https://github.com/godaddy/kubernetes-external-secrets

It supports both SSM Parameter Store and AWS Secrets Manager as backends. Pros of this comparing to init container is that you have a much more narrow scope of pods with an access to SSM. In your case it's every pod (every init container you run), in the case of kubernetes-external-secrets it's only one controller pod per cluster. And of course, it gives less boilerplate.

Similar solutions:

-- Max Lobur
Source: StackOverflow