I'm creating a Kubernetes deployment that needs to pull an image from a private registry.
The private registry requires credentials to authenticate to be able to pull an image, so I've added an imagePullSecret to the default service account in my namespace.
Is it a security issue to give the default service account in my namespace an imagePullSecret so that the pods can pull images from my private registry?
I am unsure of what questions I need to be asking myself to determine if there are any security issues. The official documentation shows an example of how to add an imagePullSecret to the default service account.
I've thought of two alternative ways to achieve what I want, but I am unsure if these are any safer:
- Creating a new service account and adding an imagePullSecret
- Declaring the imagePullSecret in the actual pods’ spec of the deployment.