imagePullSecrets apply to both initContainers as well as regular containers, they are defined outside of the container specification. So I would assume that you have some different problem in the end - how did you come to the conclusion that the pull secrets are not being used to pull the init container image?
The Weaviate image stored in the same registry can be successfully pulled, but when trying to pull Alpine as an init container, the following error occurs:
Events:
Type Reason Age From Message
Normal Scheduled 8m18s default-scheduler Successfully assigned weaviate/weaviate-0 to node1
Warning Failed 6m52s (x6 over 8m16s) kubelet Error: ImagePullBackOff
Normal Pulling 6m38s (x4 over 8m17s) kubelet Pulling image “my_registry_url/alpine:latest”
Warning Failed 6m37s (x4 over 8m17s) kubelet Failed to pull image “my_registry_url/alpine:latest”: rpc error: code = Unknown desc = failed to pull and unpack image “my_registry_url/alpine:latest”: failed to resolve reference “my_registry_url/alpine:latest”: failed to authorize: failed to fetch anonymous token: unexpected status: 401 Unauthorized
Warning Failed 6m37s (x4 over 8m17s) kubelet Error: ErrImagePull
Normal BackOff 3m15s (x20 over 8m16s) kubelet Back-off pulling image “my_registry_url/alpine:latest”