Skip to content
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

can't push image to other registry #1394

Closed
imroc opened this issue Dec 14, 2018 · 5 comments
Closed

can't push image to other registry #1394

imroc opened this issue Dec 14, 2018 · 5 comments
Labels
build/kaniko help wanted We would love to have this done, but don't have the bandwidth, need help from contributors kind/feature-request kind/question User question

Comments

@imroc
Copy link

imroc commented Dec 14, 2018

If push image to the registry other than gcr or acr, kaniko need mount docker config.json to /kaniko/.docker/config.json, and skaffold do not support this configuration, the pullSecretName config is the GCP credidential, not docker config

@priyawadhwa priyawadhwa added kind/feature-request build/kaniko help wanted We would love to have this done, but don't have the bandwidth, need help from contributors labels Dec 14, 2018
@bzub
Copy link

bzub commented Dec 15, 2018

For now it's possible to work around this issue with a PodPreset defined in the namespace where kaniko runs. Details to enable that here.

Example

Create a k8s Secret out of ~/.docker/config.json

kubectl create secret generic docker-config --from-file ~/.docker/config.json -n kaniko

kubectl -n kaniko apply the following manifest:

apiVersion: settings.k8s.io/v1alpha1
kind: PodPreset
metadata:
  name: docker-config
spec:
  selector:
    matchLabels:
      skaffold-kaniko: skaffold-kaniko
  volumeMounts:
    - mountPath: /kaniko/.docker/
      name: docker-config
  volumes:
    - name: docker-config
      secret:
        secretName: docker-config

@imroc
Copy link
Author

imroc commented Dec 15, 2018

This is indeed a way to work, although a little bit tricky

@imroc imroc closed this as completed Dec 15, 2018
@bzub
Copy link

bzub commented Dec 15, 2018

I'd recommend opening this again unless there's already an issue for this. My comment was just a workaround.

@imroc imroc reopened this Dec 15, 2018
@dgageot
Copy link
Contributor

dgageot commented Jan 20, 2019

@priyawadhwa Is that fixed with #1466?

@dgageot dgageot added the kind/question User question label Jan 20, 2019
@dgageot
Copy link
Contributor

dgageot commented Jan 20, 2019

yes, I think #1466 fixed that. Let's close this issue. And, please, feel free to reopen in case the problem still exists.

@dgageot dgageot closed this as completed Jan 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build/kaniko help wanted We would love to have this done, but don't have the bandwidth, need help from contributors kind/feature-request kind/question User question
Projects
None yet
Development

No branches or pull requests

4 participants