kubectl does not neutralize escape, meta or control sequences contained in the raw data it outputs to a terminal. This includes but is not limited to the unstructured string fields in objects such as Events. Reference: https://github.com/kubernetes/kubernetes/issues/101695
Created kubernetes tracking bugs for this issue: Affects: fedora-all [bug 2042419]
Created golang-k8s-kubectl tracking bugs for this issue: Affects: fedora-all [bug 2043563] Created golang-k8s-kubernetes tracking bugs for this issue: Affects: fedora-all [bug 2043564] Created origin tracking bugs for this issue: Affects: fedora-all [bug 2043565]
As an FYI, upstream merged a pull request (https://github.com/kubernetes/kubernetes/pull/112553 ) which provides a partial fix for this bug. Pull request merged 11 days ago (today is 2022.11.10). See comment https://github.com/kubernetes/kubernetes/pull/112553#pullrequestreview-1161103953 on partial nature of pull request.