How to update YAML/conf files in K8s ConfigMap that contain `\n` and have garbled formatting
This may be caused by extra line breaks such as `\n` at the end of a certain line in the content, leading to abnormal recognition by K8s. You can export the corresponding file, modify it manually, and then patch it back. Back up the current ConfigMap kubectl -n xxx get configmap xxx -o yaml > … Read more