New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initContainers does not accept imagePullSecrets #70732

Open
opme opened this Issue Nov 7, 2018 · 5 comments

Comments

Projects
None yet
5 participants
@opme

opme commented Nov 7, 2018

What happened:
initContainers does not accept imagePullSecrets. No way to configure a secret so initContainers can connect to a private repository.

What you expected to happen:
Adding an imagePullSecrets under spec should work for both container and initContainers

How to reproduce it (as minimally and precisely as possible):
Have a template with both container and initContainer. Define a imagePullSecret under spec. Use a private repository where you authenticate with secret.

You will get imagePullBackoff and cannot connect to repository for your images that need to be pulled from your init containers.

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version): 1.8.11
  • Cloud provider or hardware configuration: Docker EE with Kubernetes, DTR (Docker Trusted Registry)
  • OS (e.g. from /etc/os-release): alpine
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

/kind bug

@dims

This comment has been minimized.

Member

dims commented Nov 7, 2018

/sig node

@k8s-ci-robot k8s-ci-robot added sig/node and removed needs-sig labels Nov 7, 2018

@Twister915

This comment has been minimized.

Twister915 commented Nov 7, 2018

Attempted to investigate this, and in case it's helpful to anyone else who wants to work on this:

https://github.com/kubernetes/kubernetes/blob/release-1.8/pkg/kubelet/kuberuntime/kuberuntime_manager.go#L686

It appears init containers are created with the exact same call that other containers are, in release 1.8.x (checked 1.8.15 on that branch and 1.8.11 as specified by user).

@zjj2wry

This comment has been minimized.

Member

zjj2wry commented Nov 7, 2018

/assign
i want to work on this,will investigate this

@opme

This comment has been minimized.

opme commented Nov 12, 2018

Let me know if you need any information to reproduce. We can upgrade to 1.8.15. I have heard it is working ok in v1.10.3.

@zjj2wry

This comment has been minimized.

Member

zjj2wry commented Nov 14, 2018

I saw the code of 1.8 and didn't see any difference in processing imagePullSecret

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment