GoogleContainerTools/skaffold · error
found multiple log prefixes in skaffold.yaml (not supported
Error message
found multiple log prefixes in skaffold.yaml (not supported in `skaffold apply`): %s, %s
What it means
getDefaultDeployer merges log settings across multiple skaffold configs. When configs declare different `deploy.logs.prefix` values, there is no single prefix to use, so this error is returned for `skaffold apply`. It lists both conflicting prefixes.
Source
Thrown at pkg/skaffold/runner/deployer.go:264
kubeContext = d.KubeContext
}
if d.StatusCheck != nil {
if statusCheck == nil {
statusCheck = d.StatusCheck
} else if statusCheck != d.StatusCheck {
// if we get conflicting values for status check from different skaffold configs, we turn status check off
statusCheck = util.Ptr(false)
}
}
if d.StatusCheckDeadlineSeconds != 0 && d.StatusCheckDeadlineSeconds != int(status.DefaultStatusCheckDeadline.Seconds()) {
if statusCheckTimeout != -1 && statusCheckTimeout != d.StatusCheckDeadlineSeconds {
return nil, fmt.Errorf("found multiple status check timeouts in skaffold.yaml (not supported in `skaffold apply`): %d, %d", statusCheckTimeout, d.StatusCheckDeadlineSeconds)
}
statusCheckTimeout = d.StatusCheckDeadlineSeconds
}
if d.Logs.Prefix != "" {
if logPrefix != "" && logPrefix != d.Logs.Prefix {
return nil, fmt.Errorf("found multiple log prefixes in skaffold.yaml (not supported in `skaffold apply`): %s, %s", logPrefix, d.Logs.Prefix)
}
logPrefix = d.Logs.Prefix
}
var currentDefaultNamespace *string
var currentKubectlFlags latest.KubectlFlags
if d.KubectlDeploy != nil {
currentDefaultNamespace = d.KubectlDeploy.DefaultNamespace
currentKubectlFlags = d.KubectlDeploy.Flags
}
if kFlags == nil {
kFlags = ¤tKubectlFlags
}
if err := validateKubectlFlags(kFlags, currentKubectlFlags); err != nil {
return nil, err
}
if currentDefaultNamespace != nil {
if defaultNamespace != nil && *defaultNamespace != *currentDefaultNamespace {
return nil, fmt.Errorf("found multiple namespaces in skaffold.yaml (not supported in `skaffold apply`): %s, %s", *defaultNamespace, *currentDefaultNamespace)View on GitHub (pinned to a1189de023)
Solutions
- Set an identical `deploy.logs.prefix` in all composed configs
- Remove `logs.prefix` from all configs except one
- Centralize logging config in a shared base skaffold config
Example fix
// config-a (before)
deploy:
logs:
prefix: app-
// config-b (before)
deploy:
logs:
prefix: svc-
// after
# set prefix: app- in both, or omit in config-b Defensive patterns
Strategy: validation
Validate before calling
const prefixes = configs.map(c => c.deploy?.logs?.prefix).filter(Boolean)
if (new Set(prefixes).size > 1) {
throw new Error('conflicting logs.prefix values: ' + prefixes.join(', '))
} Prevention
- Define log prefix once in a shared base config
- Omit logs.prefix in per-service configs that get composed together
- Validate merged config output before running apply in CI
When it happens
Trigger: Running `skaffold apply` against multiple skaffold configs where `deploy.logs.prefix` is set to different strings in at least two configs.
Common situations: Composing per-service skaffold configs (dependencies/profiles) that each set their own log prefix.
Related errors
- found multiple status check timeouts in skaffold.yaml (not s
- found multiple namespaces in skaffold.yaml (not supported in
- kpt deployer mixed in with other deployers not supported yet
- creating deployer: %w
- strings.Join(errMsgs, "\n") (joined helm cleanup error messa
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/8526f369c49b7265.
Report an issue: GitHub.