GoogleContainerTools/skaffold · error
creating runner: %w
Error message
creating runner: %w
What it means
Skaffold failed to construct its runner from the loaded configuration set. runner.NewForConfig validates the configs and selects renderer/deployer implementations; any error there is wrapped as 'creating runner' and triggers the InitializationFailed event.
Source
Thrown at cmd/skaffold/app/cmd/runner.go:75
}
// createNewRunner creates a Runner and returns the SkaffoldConfig associated with it.
func createNewRunner(ctx context.Context, out io.Writer, opts config.SkaffoldOptions) (runner.Runner, []util.VersionedConfig, *runcontext.RunContext, error) {
runCtx, configs, err := runContext(ctx, out, opts)
if err != nil {
return nil, nil, nil, err
}
var v2Configs []*latest.SkaffoldConfig
for _, c := range configs {
v2Configs = append(v2Configs, c.(*latest.SkaffoldConfig))
}
instrumentation.Init(v2Configs, opts.User, runCtx.GetKubeContext())
hooks.SetupStaticEnvOptions(runCtx)
runner, err := runner.NewForConfig(ctx, runCtx)
if err != nil {
event.InititializationFailed(err)
return nil, nil, nil, fmt.Errorf("creating runner: %w", err)
}
return runner, configs, runCtx, nil
}
func runContext(ctx context.Context, out io.Writer, opts config.SkaffoldOptions) (*runcontext.RunContext, []util.VersionedConfig, error) {
cfgSet, err := withFallbackConfig(ctx, out, opts, parser.GetConfigSet)
if err != nil {
return nil, nil, err
}
setDefaultRendererAndDeployer(cfgSet)
if err := validation.Process(cfgSet, validation.GetValidationOpts(opts)); err != nil {
return nil, nil, fmt.Errorf("invalid skaffold config: %w", err)
}
var configs []util.VersionedConfig
for _, cfg := range cfgSet {
configs = append(configs, cfg.SkaffoldConfig)
}View on GitHub (pinned to a1189de023)
Solutions
- Check the wrapped cause after 'creating runner:' for the specific incompatibility
- Verify skaffold.yaml apiVersion is supported: run `skaffold config list` or check skaffold version compatibility
- Run `skaffold fix` to migrate an old schema to the current version
- Simplify or split multi-config setups that mix incompatible deployers
Example fix
// before apiVersion: skaffold/v1beta2 kind: Config // after skaffold fix # -> apiVersion: skaffold/v4beta7 kind: Config
Defensive patterns
Strategy: validation
Validate before calling
if ! skaffold config list >/dev/null 2>&1; then echo 'skaffold cannot read config'; fi skaffold fix --overwrite 2>/dev/null || true # migrate old schemas first
Try / catch
runner, configs, runCtx, err := createNewRunner(ctx, out, opts)
if err != nil {
if strings.Contains(err.Error(), "creating runner:") {
return fmt.Errorf("runner init failed (check skaffold.yaml apiVersion): %w", err)
}
return err
} Prevention
- Keep skaffold.yaml apiVersion compatible with the installed skaffold version
- Run `skaffold fix` after upgrading skaffold
- Test config changes with `skaffold diagnose` before run/dev
- Pin skaffold version in CI to match schema versions used
When it happens
Trigger: Calling any skaffold command that creates a runner (run, dev, debug, deploy) where runner.NewForConfig returns an error: unsupported config schema version, invalid renderer/deployer combination, or internal config incompatibilities after defaults are applied.
Common situations: skaffold.yaml uses apiVersion not supported by the installed skaffold binary; mixing configs from multiple files that disagree on deployer type; upgrading skaffold past the config's schema version.
Related errors
- INSPECT_PROFILE_NOT_FOUND_ERR
- cannot resolve active Kubernetes context - multiple contexts
- filename not specified
- getting run context: %w
- getting tagger: %w
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/c7c8e23f20a7b9e6.
Report an issue: GitHub.