<p>I have a usecase where (at least for now) I need a k8s pod to stay up without a HTTP or TCP endpoint. I tried the following deployment...</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata: 
  name: node-deployment
  labels:
    app: node-app
spec: 
  selector: 
    matchLabels:
      app: node-app
  template:
    metadata:
      labels:
        app: node-app
    spec:
      containers:
      - name: node-server
        image: node:17-alpine
        exec:
            command: [&quot;node&quot;,&quot;-v&quot;]
        livenessProbe:
          exec:
            command: [&quot;node&quot;,&quot;-v&quot;]
          initialDelaySeconds: 5
          periodSeconds: 5  
        readinessProbe:
          exec:
            command: [&quot;node&quot;,&quot;-v&quot;]
          initialDelaySeconds: 5
          periodSeconds: 5  
</code></pre>
<p>But after a while it stops the pod with the following error...</p>
<blockquote>
<p>Warning  BackOff    5s (x10 over 73s)  kubelet, minikube  Back-off restarting failed container</p>
</blockquote>
<p>And the pod status shows...</p>
<blockquote>
<p>node-deployment-58445f5649-z6lkz           0/1     CrashLoopBackOff   5 (103s ago)   4m47s</p>
</blockquote>
<p>I know it is running because I see the version in <code>kubectl logs &lt;node-name&gt;</code>. How do I get the image to stay up with no long running process? Is this even possible?</p>

Jackie
<p>The process of the container simply exited, the same happens if you run <code>node -v</code> in your terminal.</p>
<p>Not sure if the use case you provide is your real use case ( I can't see any reason to have the node version as an application), so ..</p>
<p>if you really want to have the version, you can change the command to be</p>
<pre><code>[&quot;watch&quot;,&quot;-n1&quot;,&quot;node&quot;,&quot;-v&quot;]
</code></pre>
<p>So it will print the node version every second</p>
