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
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.
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
This is indeed a way to work, although a little bit tricky
I'd recommend opening this again unless there's already an issue for this. My comment was just a workaround.
@priyawadhwa Is that fixed with #1466?
yes, I think #1466 fixed that. Let's close this issue. And, please, feel free to reopen in case the problem still exists.