添加 CloudNative/Kubernetes/Base/创建configmap格式异常问题.md
This commit is contained in:
parent
7e237b8ca6
commit
1f3d8c8e2d
1 changed files with 7 additions and 0 deletions
7
CloudNative/Kubernetes/Base/创建configmap格式异常问题.md
Normal file
7
CloudNative/Kubernetes/Base/创建configmap格式异常问题.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
可能是由于配置文件(如nginx.conf)文件自身存在制表符TAB或者尾随空格,Kubernetes ConfigMap在load过程中发现文件中包含tab缩进,直接转化为\n\t。
|
||||
```shell
|
||||
# 使用以下方法删除尾随空格
|
||||
sed -i -E 's/[[:space:]]+$//g' file.txt
|
||||
# 使用空格替换制表符
|
||||
sed -i 's/\t/ /g' file.txt
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue