Before you act
- Confirm that the scope matches your case.
- Keep recommendations, enforced limits, exceptions, and unstated details distinct.
- Open the official source before relying on the rule for a consequential decision.
Source-backed platform rule
Kubernetes limits the data stored in a ConfigMap to 1 MiB; the source does not state a specific enforcement action.
RuleRoster is independent and is not affiliated with or endorsed by Kubernetes.
Direct answer
The data stored in a Kubernetes ConfigMap cannot exceed 1 MiB; the specific enforcement action is not stated.
Published evidence
The data stored in a Kubernetes ConfigMap cannot exceed 1 MiB. The reviewed documentation does not state a specific enforcement action, so RuleRoster does not infer one.
Service: Kubernetes. Rule group: object size. Resource: data stored in one ConfigMap. Policy version and effective dates: not stated.
Worked check
Measure the rendered ConfigMap, not the YAML file length. This local Node.js check adds UTF-8 bytes in data to decoded bytes in binaryData. Keys and JSON formatting are not part of this particular data-size check.
node -e 'const fs = require("node:fs");
const cm = JSON.parse(fs.readFileSync(0, "utf8"));
if (cm.apiVersion !== "v1" || cm.kind !== "ConfigMap") {
throw new Error("Expected a v1 ConfigMap JSON object, not a Secret or List");
}
function entries(value) {
if (value === undefined || value === null) return [];
if (typeof value !== "object" || Array.isArray(value)) {
throw new Error("Expected a map of strings");
}
return Object.entries(value).map(([key, text]) => {
if (typeof text !== "string") throw new Error("Values must be strings");
return [key, text];
});
}
let bytes = 0;
for (const [key, text] of entries(cm.data)) {
if (Object.hasOwn(cm.binaryData ?? {}, key)) throw new Error("Duplicate data key");
bytes += Buffer.byteLength(text, "utf8");
}
for (const [, text] of entries(cm.binaryData)) {
const decoded = Buffer.from(text, "base64");
if (decoded.toString("base64") !== text) throw new Error("Expected canonical base64");
bytes += decoded.length;
}
console.log(JSON.stringify({
bytes, limitBytes: 1048576, withinDataLimit: bytes <= 1048576
}));' < configmap.jsonA value containing é uses 2 UTF-8 bytes; binaryData containing AQID decodes to 3 bytes. Together they use 5 bytes, regardless of their key names. Exactly 1,048,576 data bytes passes this size check; one byte more does not.
This is not an API admission guarantee: invalid keys, metadata, quotas, policies, and immutable updates can still reject an object. The byte-counting behavior was checked against Kubernetes v1.34; confirm your cluster version before relying on it.
Worked guidance reviewed September 20, 2026. This does not renew the published rule’s verification or source-check dates.
Evidence trail
Kubernetes · verified August 14, 2026
Kubernetes website and documentation by The Kubernetes Authors. Source: https://github.com/kubernetes/website/tree/0dcdb1dda898de2bd4431a898f86c170e109063f. Licensed under Creative Commons Attribution 4.0 International: https://github.com/kubernetes/website/blob/0dcdb1dda898de2bd4431a898f86c170e109063f/LICENSE. Modified by RuleRoster: RuleRoster extracted and restructured facts into typed rule fields and concise answers. Verified 2026-08-14. No root NOTICE file was present at the reviewed revision. The Creative Commons license does not license trademark or patent rights. No endorsement by Kubernetes is implied.
Interpretation and accountability
If the source or summary appears wrong, submit precise evidence for human review.