kubectl diff adds show-secret flag
Introduced 2026-04-22 · score 0.93
HOW TO USE IT
When reviewing a diff that must display Secret values, run `kubectl diff` with `--show-secrets` and a manifest path. The v1.36 source uses the plural flag; the release note uses the singular form.
kubectl diff --show-secrets -f <manifest>WHY THIS HELPS
Review a diff that includes Kubernetes Secret values.
REQUIREMENTS AND LIMITATIONS
- Version: v1.36.0
- --show-secrets: Boolean flag; when true, do not mask Secret values in the diff. Defaults to false.
- -f, --filename <manifest> (required): Filename, directory, or URL containing configuration to diff.
- The flag explicitly allows secret values to be displayed during the diff operation.
- Docs conflict: Release note and card say `show-secret`; v1.36 source and current generated docs document `--show-secrets` (plural).
FIRST-PARTY EVIDENCE
- https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.36.md#v1360
- https://github.com/kubernetes/kubernetes/blob/release-1.36/staging/src/k8s.io/kubectl/pkg/cmd/diff/diff.go
- https://kubernetes.io/docs/reference/kubectl/generated/kubectl_diff/
Check the installed version and the source before using it. Entry JSON