<p>I have a process building successfully with Docker but that always fails the deployment step.</p>
<p>The process is a non-http quickly-running sweep of some files ... I tried adding a TCP liveness and readiness probe to the <strong>deploy.yaml</strong> in the /kubernetes directory for the GKE automated deployment setup.</p>
<p>I also: reversed the exit codes (was returning 1 on success so I made this 0 as Kubernetes expects) ...</p>
<p>Started with two threads: one a tcp server that does <strong>serve_forever</strong> at the end and the other the real work process, with extra <strong>sleep</strong> to let Kubernetes catch up ...</p>
<pre><code>if __name__ == '__main__':

    t = Thread(target=main, args=(None,None))
    t2 = Thread(target=tcpserve, args=([1]), daemon=True)
    t.start()
    t2.start()
</code></pre>
<p>I'm just about out of arrows on this; any suggestions?</p>

Mark McWiggins
<p>I found it!</p>
<p>The Tcp server I was using I started like this:</p>
<pre><code> aServer         = socketserver.TCPServer((&quot;127.0.0.1&quot;, 8080), MyTCPRequestHandler)
</code></pre>
<p>But instead it needed to be this:</p>
<pre><code> aServer         = socketserver.TCPServer((&quot;0.0.0.0&quot;, 8080), MyTCPRequestHandler)
</code></pre>
<p><em>splut</em> ... I should have seen this earlier!!!</p>
