user3133475
user3133475

Reputation: 3161

How to use private repository with initContainer

I am able to use a imagePullSecret in my spec so that my container section images are able to connect to a private repository. If I have initContainer section also, it is not using the imagePullSecret and the deployment fails.

Upvotes: 1

Views: 664

Answers (1)

Kun Li
Kun Li

Reputation: 2755

ImagePullSecret will work for both normal container and initContainer, you just need to define imagePullSecret once in your spec.

Upvotes: 3

Related Questions