kubernetes/kops · error
evictionSoft: %w
Error message
evictionSoft: %w
What it means
Same parseKeyValueList mechanism as evictionHard but applied to EvictionSoft: entries must be key<value pairs split on '<'. A comma-separated entry missing '<' aborts kubelet configuration assembly with this wrapped error.
Source
Thrown at nodeup/pkg/model/kubelet.go:394
cc.EventRecordQPS = kubeletConfig.EventQPS
}
if b.NodeupConfig.ContainerdConfig.Address == nil {
cc.ContainerRuntimeEndpoint = "unix:///run/containerd/containerd.sock"
} else {
cc.ContainerRuntimeEndpoint = "unix://" + fi.ValueOf(b.NodeupConfig.ContainerdConfig.Address)
}
if kubeletConfig.EvictionHard != nil {
evictionHard, err := parseKeyValueList(*kubeletConfig.EvictionHard, "<")
if err != nil {
return nil, fmt.Errorf("evictionHard: %w", err)
}
cc.EvictionHard = evictionHard
}
evictionSoft, err := parseKeyValueList(kubeletConfig.EvictionSoft, "<")
if err != nil {
return nil, fmt.Errorf("evictionSoft: %w", err)
}
cc.EvictionSoft = evictionSoft
evictionSoftGracePeriod, err := parseKeyValueList(kubeletConfig.EvictionSoftGracePeriod, "=")
if err != nil {
return nil, fmt.Errorf("evictionSoftGracePeriod: %w", err)
}
cc.EvictionSoftGracePeriod = evictionSoftGracePeriod
evictionMinimumReclaim, err := parseKeyValueList(kubeletConfig.EvictionMinimumReclaim, "=")
if err != nil {
return nil, fmt.Errorf("evictionMinimumReclaim: %w", err)
}
cc.EvictionMinimumReclaim = evictionMinimumReclaim
featureGates, err := parseFeatureGates(kubeletConfig.FeatureGates)
if err != nil {
return nil, fmt.Errorf("featureGates: %w", err)
}
cc.FeatureGates = featureGatesView on GitHub (pinned to 4c8573c808)
Solutions
- Fix the offending entry to use '<' between key and value (message quotes the bad pair)
- Distinguish fields: evictionSoft uses '<', evictionSoftGracePeriod and evictionMinimumReclaim use '='
- Validate the CSV string locally with a quick split-and-check before applying
- kops update cluster after correcting the spec
Example fix
// before kubelet: evictionSoft: "memory.available=100Mi" // after kubelet: evictionSoft: "memory.available<100Mi"
Defensive patterns
Strategy: validation
Validate before calling
func validEvictionSoft(s string) bool {
if s == "" { return true }
for _, kv := range strings.Split(s, ",") {
if !strings.Contains(kv, "<") { return false }
}
return true
} Try / catch
if _, err := parseKeyValueList(cfg.EvictionSoft, "<"); err != nil {
return fmt.Errorf("evictionSoft must be comma-separated key<value pairs: %w", err)
} Prevention
- Do not copy '=' syntax from grace-period fields into evictionSoft
- Each entry must contain exactly the '<' separator
- Validate specs in CI with a small parse harness
When it happens
Trigger: kubeletConfiguration -> parseKeyValueList(kubeletConfig.EvictionSoft, "<") fails because an entry in spec.kubelet.evictionSoft lacks the '<' separator.
Common situations: Mixing up separators: grace periods use '=' but evictionSoft thresholds use '<'; users copy grace-period syntax into evictionSoft; typos like "memory.available 100Mi" (missing separator entirely).
Related errors
- evictionHard: %w
- evictionSoftGracePeriod: %w
- evictionMinimumReclaim: %w
- invalid key/value pair %q (expected separator %q)
- featureGates: %w
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/318fd17902d5317c.
Report an issue: GitHub.