<p>I'm working with Neo4j in Kubernetes.
For a showcase, I want to fill the Neo4j in the Pods with initial data which i can do with a cypher-file, I'm having in the <code>/bin</code> folder using the cypher-shell.
So basically I start the container and run <code>cat bin/initialData.cypher | bin/cypher-shell</code>.
I've validated that this works by running it in the <code>kubectl exec -it &lt;pod&gt; /bin/bash</code> bash.
However, no matter how I try to map to the <code>spec.container.command</code>, it fails.
Currently my best guess is</p>

<pre><code>spec:
  containers:
    command:
        - /bin/bash
        - -c
        - |
          cd bin
          ls
          cat initialData.cypher | cypher-shell
</code></pre>

<p>which does not work. It displays the <code>ls</code> correctly but throws a <code>connection refused</code> afterwards, where I have no idea where its coming from.</p>

<p>edit: Updated </p>

Urr4
<p>You did valid spec, but with a wrong syntax.</p>

<p>Try like this</p>

<pre><code>spec:
  containers:
    command: ["/bin/bash"]
    args: ["-c","cat import/initialData.cypher | bin/cypher-shell"]
</code></pre>

<p>Update:
In your neo4j.conf you have to uncomment the lines related to using the neo4j-shell</p>

<pre><code># Enable a remote shell server which Neo4j Shell clients can log in to.
dbms.shell.enabled=true
# The network interface IP the shell will listen on (use 0.0.0.0 for all interfaces).
dbms.shell.host=127.0.0.1
# The port the shell will listen on, default is 1337.
dbms.shell.port=1337
</code></pre>
