-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
Expected behavior
When deploying to a KinD cluster, Skaffold should automatically detect the local cluster and load built images directly into the cluster nodes instead of pushing to a remote registry and having the cluster pull them.
Actual behavior
Skaffold builds images locally but does not load them into the KinD cluster. The cluster attempts to pull images from the remote registry (ghcr.io), resulting in authentication failures since the cluster nodes don't have registry credentials.
Information
- Skaffold version:
2.16.0
(also tested with2.15.0
and2.14.0
) - Operating system: macOS Darwin 24.5.0 (arm64)
- Installation method: GitHub releases (
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.16.0/skaffold-darwin-arm64
) - Contents of skaffold.yaml:
apiVersion: skaffold/v4beta13
kind: Config
metadata:
name: upkind
build:
local:
useBuildkit: true
useDockerCLI: true
concurrency: 0
push: true
tryImportMissing: true
tagPolicy:
gitCommit:
variant: AbbrevCommitSha
artifacts:
- image: ghcr.io/uptime-com/upkind/toolbox
context: docker/toolbox
manifests:
rawYaml:
- job.yaml
deploy:
kubectl: {}
Contents of job.yaml (demonstrates toolbox image usage):
apiVersion: batch/v1
kind: Job
metadata:
name: test-job
spec:
template:
spec:
containers:
- name: test
image: ghcr.io/uptime-com/upkind/toolbox
command: ["echo", "hello"]
restartPolicy: Never
Steps to reproduce the behavior
- Create a KinD cluster:
kind create cluster
- Set global config:
skaffold config set --global local-cluster true
- Run Skaffold:
skaffold run --force --cache-artifacts=false
- Observe that Skaffold detects local cluster but doesn't load images
- Check cluster for images:
docker exec kind-control-plane crictl images | grep toolbox
(returns empty) - See authentication errors in pod logs when cluster tries to pull from registry
Debug evidence:
- Skaffold correctly detects KinD:
Found [kind-kind] context, using local docker daemon.
- Local cluster detection works:
Using local-cluster=true from config
- Images build successfully and exist locally
- Different versions show different symptoms:
- v2.16.0/v2.15.0:
401 Unauthorized
errors from registry - v2.14.0:
Container image ... is not present with pull policy of Never
- v2.16.0/v2.15.0:
Workaround: Manual loading works: kind load docker-image <image>
This appears to be a regression affecting automatic KinD image loading across multiple recent Skaffold versions.
Metadata
Metadata
Assignees
Labels
No labels