<p>I'm trying to run a Spark jar on Kubernetes. I have built my own docker image using the template <code>spark-2.4.4-bin-hadoop2.7</code> and tried to run my yaml file with this docker image. </p>

<p>I have got below error from driver log <code>/opt/entrypoint.sh</code>: </p>

<pre><code>line 133: /sbin/tini: No such file or directory.
</code></pre>

<p>I understand that <code>/sbin/tini</code> is not present in docker image. Anybody could help me solve this issue? How to get this tini in docker image path?</p>

<p>command entered:</p>

<pre><code>kubectl create -f spark.yaml 
</code></pre>

<p>driver log:</p>

<pre><code>kubectl logs spark-wordcount-7-driver
++ id -u
+ myuid=0
++ id -g
+ mygid=0
+ set +e
++ getent passwd 0
+ uidentry=root:x:0:0:root:/root:/bin/bash
+ set -e
+ '[' -z root:x:0:0:root:/root:/bin/bash ']'
+ SPARK_K8S_CMD=driver
+ case "$SPARK_K8S_CMD" in
+ shift 1
+ SPARK_CLASSPATH=':/opt/spark/jars/*'
+ grep SPARK_JAVA_OPT_
+ env
+ sort -t_ -k4 -n
+ sed 's/[^=]*=\(.*\)/\1/g'
+ readarray -t SPARK_EXECUTOR_JAVA_OPTS
+ '[' -n '' ']'
+ '[' -n '' ']'
+ PYSPARK_ARGS=
+ '[' -n '' ']'
+ R_ARGS=
+ '[' -n '' ']'
+ '[' '' == 2 ']'
+ '[' '' == 3 ']'
+ case "$SPARK_K8S_CMD" in
+ CMD=("$SPARK_HOME/bin/spark-submit" --conf "spark.driver.bindAddress=$SPARK_DRIVER_BIND_ADDRESS" --deploy-mode client "$@")
+ exec /sbin/tini -s -- /opt/spark/bin/spark-submit --conf spark.driver.bindAddress=172.17.0.6 --deploy-mode client --properties-file /opt/spark/conf/spark.properties --class com.walmart.WordCount spark-internal
/opt/entrypoint.sh: line 133: /sbin/tini: No such file or directory
</code></pre>

Sivaranjani
<p>Since, you are using alpine image, you have to use /sbin/tini</p>
<p>NOTE: alpine has moved tini to /sbin/tini</p>
<p>In file: <code>entrypoint.sh</code>:</p>
<p>Do the following change</p>
<pre class="lang-sh prettyprint-override"><code>exec /usr/bin/tini -s -- /usr/bin/spark-operator &quot;$@&quot;
</code></pre>
<p>to</p>
<pre class="lang-sh prettyprint-override"><code>exec /sbin/tini -s -- /usr/bin/spark-operator &quot;$@&quot;
</code></pre>
