title: Kubernetes stop containers from restarting automatically
body: <p>I recently upgraded Docker for Mac to v18.06 and noticed it can run a local k8s cluster. I was excited to try it out and ran one of our services via <code>kubectl apply -f deployments/staging/tom.yml</code>. The yml manifest does not have a restart policy specified. I then shut it down using <code>kubectl delete -f ...</code>. Since then, each time I start docker that container is starting automatically. Here is the output of <code>docker ps</code>, truncated for brevity</p>
  
  <pre><code>CONTAINER ID    IMAGE            COMMAND                  CREATED             NAMES
  2794eae1f31e    b06778bfe205     "/bin/sh -c 'java -c…"   27 minutes ago      k8s_tom-joiner_tom-joiner-66fcfd84bc...
  8dd19dd65486    b06778bfe205     "/bin/sh -c 'java -c…"   27 minutes ago      k8s_tom-loader_tom-loader-6cb9f7f4fb...
  ...
  </code></pre>
  
  <p>However, the image is not managed by Kubernetes, so I cannot do <code>kubectl delete -f</code></p>
  
  <pre><code>kubectl get pods
  No resources found.
  </code></pre>
  
  <p>How do I permanently shut down the image and prevent if from restarting automatically? I tried <code>docker update --restart=no $(docker ps -a -q)</code> with no luck</p>