WhatBrokeToday
GTA 6FAQ
Kubernetes

Kubernetes kubectl Silently Drops Keys on Lines Exceeding 64 KiB in Env Files

medium

Is it fixed? Not yet.

Ongoing since Nov 17, 07:23 UTC. First reported Nov 17, 07:23 UTC.

What happened

The `kubectl create secret/configmap --from-env-file` command silently drops keys when encountering a line exceeding the 64 KiB scanner buffer limit because `AddFromEnvFile` fails to check `scanner.Err()`. Users parsing large environment files, base64-encoded TLS certificates, or large JSON credentials are affected, as keys past the oversized line are omitted without error.

What caused it?

cmdutil.AddFromEnvFile uses a default bufio.NewScanner(f) with a 64 KiB token limit and returns nil after the scanner loop without verifying scanner.Err().

No verified workaround yet

None of the linked reports describe a mitigation. This page updates when one appears.

Official fix

Timeline

  1. Investigating(current)
  2. Workaround available(upcoming)
  3. Resolved(upcoming)
  1. First report on GitHub issue

    kubectl create secret/configmap --from-env-file silently drops keys when a line exceeds 64 KiB

    Source

Evidence

1 report · 1 GitHubShow
  1. [1]
    GitHub First report
    kubectl create secret/configmap --from-env-file silently drops keys when a line exceeds 64 KiB(opens GitHub issue in a new tab)

    What happened? cmdutil.AddFromEnvFile (staging/src/k8s.io/kubectl/pkg/cmd/util/env_file.go) reads .env files with a default bufio.NewScanner(f) (64 KiB token limit) and returns nil right after the for scanner.Scan() loop without checking scanner.Err(). If a single line is longer than 64 KiB (for example, a base64-encoded TLS cert chain or large JSON credential) or hits a mid-stream read error, scanner.Scan() stops early and sets scanner.Err() (bufio.ErrTooLong), while AddFromEnvFile still…

    by abhinavkdeval08-design 0upvotes 2comments

FAQ

What happened in the Kubernetes issue?

The `kubectl create secret/configmap --from-env-file` command silently drops keys when encountering a line exceeding the 64 KiB scanner buffer limit because `AddFromEnvFile` fails to check `scanner.Err()`. Users parsing large environment files, base64-encoded TLS certificates, or large JSON credentials are affected, as keys past the oversized line are omitted without error.

What is affected by the Kubernetes issue?

Kubernetes.

When did the Kubernetes issue start and end?

It started Nov 17, 07:23 UTC and is still ongoing (1 d 21 h so far). This page updates as it develops.

How do I get alerts for Kubernetes?

Subscribe to the Kubernetes RSS feed for every new Kubernetes incident, or connect an AI assistant to WhatBrokeToday over MCP and ask whether Kubernetes is down. Kubernetes feed

Where does this information come from?

WhatBrokeToday collects public status pages, developer community reports and security advisories, groups the ones about the same problem, and links every report under Evidence on this page. This one has 1 report from 1 independent source.