无法写入 docker /usr/share/logstash/config/ 中的 logstash 配置文件
Cannot write to logstash configuration file in docker /usr/share/logstash/config/
我正在尝试通过 kubernetes 在 docker 运行 中的 /usr/share/logstash/config
中添加一个配置文件,我使用 $ kubectl exe -it "docker_name" -- /bin/bash
控制台到 docker .
然后我在 /usr/share/logstash/config/
中创建了一个 .conf 文件,但是当尝试保存配置时它给我一个错误:
pipeline/input main.conf E166: Cant open linked file for writing.
我不确定一开始我所做的是否正确,或者是否应该有更好的方法来实现这一目标?
错误E166 Can't open linked file for writing
You are trying to write to a file which can't be overwritten, and the file is a link (either a hard link or a symbolic link). Writing might still be possible if the directory that contains the link or the file is writable, but Vim now doesn't know if you want to delete the link and write the file in its place, or if you want to delete the file itself and write the new file in its place. If you really want to write the file under this name, you have to manually delete the link or the file, or change the permissions so that Vim can overwrite
您应该使用 ConfigMap 来更改配置文件
我正在尝试通过 kubernetes 在 docker 运行 中的 /usr/share/logstash/config
中添加一个配置文件,我使用 $ kubectl exe -it "docker_name" -- /bin/bash
控制台到 docker .
然后我在 /usr/share/logstash/config/
中创建了一个 .conf 文件,但是当尝试保存配置时它给我一个错误:
pipeline/input main.conf E166: Cant open linked file for writing.
我不确定一开始我所做的是否正确,或者是否应该有更好的方法来实现这一目标?
错误E166 Can't open linked file for writing
You are trying to write to a file which can't be overwritten, and the file is a link (either a hard link or a symbolic link). Writing might still be possible if the directory that contains the link or the file is writable, but Vim now doesn't know if you want to delete the link and write the file in its place, or if you want to delete the file itself and write the new file in its place. If you really want to write the file under this name, you have to manually delete the link or the file, or change the permissions so that Vim can overwrite
您应该使用 ConfigMap 来更改配置文件