kubernetes/kops · error

evictionMinimumReclaim: %w

Error message

evictionMinimumReclaim: %w

What it means

EvictionMinimumReclaim is parsed with parseKeyValueList using '=' as separator (e.g. "memory.available=0Gi"). Any comma-separated entry lacking '=' produces this wrapped error during kubelet config assembly.

Source

Thrown at nodeup/pkg/model/kubelet.go:404

		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 = featureGates

	if kubeletConfig.EnforceNodeAllocatable != "" {
		cc.EnforceNodeAllocatable = strings.Split(kubeletConfig.EnforceNodeAllocatable, ",")
	}

	for _, t := range kubeletConfig.Taints {
		taint, err := parseTaint(t)
		if err != nil {
			return nil, fmt.Errorf("taints: %w", err)
		}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Format each entry as key=value, e.g. memory.available=1Gi
  2. Fix the quoted bad pair from the error message
  3. Keep reclaim values separate from threshold ('<') fields
  4. Validate and re-apply the cluster spec

Example fix

// before
kubelet:
  evictionMinimumReclaim: "memory.available<1Gi"
// after
kubelet:
  evictionMinimumReclaim: "memory.available=1Gi"
Defensive patterns

Strategy: validation

Validate before calling

func validMinimumReclaim(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.EvictionMinimumReclaim, "="); err != nil {
    return fmt.Errorf("evictionMinimumReclaim must be key=value pairs: %w", err)
}

Prevention

When it happens

Trigger: kubeletConfiguration -> parseKeyValueList(kubeletConfig.EvictionMinimumReclaim, "=") fails because an entry has no '=' separator.

Common situations: Writing threshold-style '<' pairs into minimum-reclaim; typos dropping the value or separator; confusion between the four eviction fields each with its own separator convention ('<' vs '=').

Related errors


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/aa809def4558f505. Report an issue: GitHub.