<p>I'm trying to add a configuration file in <code>/usr/share/logstash/config</code> inside a docker run by kubernetes , I console onto the docker using <code>$ kubectl exe -it "docker_name" -- /bin/bash</code>.</p>

<p>I create then a .conf file in <code>/usr/share/logstash/config/</code> , but when try to save the configurations it give me an error :</p>

<pre><code>pipeline/input main.conf E166: Cant open linked file for writing.
</code></pre>

<p>I'm not sure if what I'm doing is right in beginning or there should be some better way to achieve this ?</p>

Ayman Abu Qutriyah
<p>Error <code>E166 Can't open linked file for writing</code></p>

<blockquote>
  <p>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</p>
</blockquote>

<p>You should use a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/" rel="nofollow noreferrer">ConfigMap</a> to change the configfile</p>
