How to use private repository with initContainer

11/7/2018

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.

-- user3133475
containers
kubernetes

1 Answer

11/7/2018

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

-- Kun Li
Source: StackOverflow