Open chris13524 opened 2 years ago
If I rename the created context to not have the k3d-
prefix in the name, then the configured default-repo works as expected:
kubectl config rename-context k3d-k3s-default k3s-default
Thanks for posting the workaround. We would appreciate community contributions to fix this issue.
Expected behavior
I expect
skaffold config --kube-context set default-repo
to work.Actual behavior
Configured
default-repo
for the kube context is ignored and thelocal-registry-hosting
value from the cluster is used instead.Information
Dockerfile:
deployment.yaml:
Steps to reproduce the behavior
k3d cluster create --registry-create=test-registry.localhost -p 5000
skaffold config --kube-context=k3d-k3s-default set default-repo test-registry.localhost:5000
skaffold --kube-context=k3d-k3s-default run
localhost:xxxx
repo name in the image tag rather thantest-registry.localhost:5000
host
field from:kubectl --context=k3d-k3s-default get cm -n kube-public local-registry-hosting -o yaml
I think the reason for this is that the default repo is only used from the command line options here. I think if this code block was duplicated for the default repo option, that might work.