<p>Docker provides the following functions to stop and start the same container.</p>
<pre><code>OP46B1:/ # docker stop 18788407a60c
OP46B1:/ # docker ps -a                                                                                                      
  CONTAINER ID  IMAGE   COMMAND   CREATED       STATUS    PORTS      NAMES                                                                                                                      
  18788407a60c ubuntu:test &quot;/bin/bash&quot; 34 minutes ago Exited (0) 7 seconds ago charming_gagarin
OP46B1:/ # docker start 18788407a60c
</code></pre>
<p>But k3s agent does not provide this function. A container stopped by &quot;k3s crictl stop&quot; cannot be restarted by &quot;k3s crictl start&quot;. The following error will appear. How to stop and start the same container at k3s agent?</p>
<pre><code>OP46B1:/data # ./k3s-arm64 crictl stop 5485f899c7bb6
  5485f899c7bb6
OP46B1:/data # ./k3s-arm64 crictl ps -a
  CONTAINER  IMAGE  CREATED  STATE NAME  ATTEMPT POD ID
  5485f899c7bb6 b58be220837f0 3 days ago  Exited  pod-webapp86  0 92a94e8eec410
OP46B1:/data# ./k3s-arm64 crictl start 5485f899c7bb6
  FATA[2020-10-20T00:54:04.520056930Z] Starting the container &quot;5485f899c7bb6&quot; failed: rpc error: code = Unknown desc = failed to set starting state for container &quot;5485f899c7bb6f2d294a3a131b33d8f35c9cf84df73cacb7b8af1ee48a591dcf&quot;: container is in CONTAINER_EXITED state
</code></pre>

<p>k3s is a distribution of kubernetes. Kubernetes is an abstraction over the container framework (containerd/docker/etc.). As such, you shouldn't try to control the containers directly using <code>k3s crictl</code>, but instead use the pod abstraction provided by kubernetes.</p>
<p><code>k3s kubectl get pods -A</code> will list all the pods that are currently running in the k3s instance.<a href="https://jamesdefabia.github.io/docs/user-guide/kubectl/kubectl_get/" rel="nofollow noreferrer">1</a><br />
<code>k3s kubectl delete pod -n &lt;namespace&gt; &lt;pod-selector&gt;</code> will delete the pod(s) specified, which will stop (and delete) their containers.<a href="https://jamesdefabia.github.io/docs/user-guide/kubectl/kubectl_delete/" rel="nofollow noreferrer">2</a></p>
