<p>I was trying to specify the <code>runtime</code> of containers deployed using Kubernetes. I follow the guide in <a href="https://kubernetes.io/docs/concepts/containers/runtime-class/#upgrading-runtimeclass-from-alpha-to-beta" rel="nofollow noreferrer">this link</a> and creating the following <code>RuntimeClass</code>:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: node.k8s.io/v1beta1
kind: RuntimeClass
metadata:
    name: runc
handler: runc

# $ kubeclt get RuntimeClass
# NAME   HANDLER   AGE
# runc   runc      59m
</code></pre>
<p>Then, I set my Pod <code>spec.runtimeClassName=&quot;runc&quot;</code>. However, when deploying this using Kubernetes, I got the following error:</p>
<pre><code>Warning  FailedCreatePodSandBox  2m43s (x141 over 32m)  kubelet, jetson1   Failed to create pod sandbox: rpc error: code = Unknown desc = RuntimeHandler &quot;runc&quot; not supported
</code></pre>
<p>I can run the container with <code>docker</code> and <code>--runtime=runc</code> without any error. But when deploying it with K8s, the error occur. The following is my <code>docker info</code>:</p>
<pre><code>Client:
 Debug Mode: false

Server:
 Containers: 11
  Running: 5
  Paused: 0
  Stopped: 6
 Images: 12
 Server Version: 19.03.6
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: nvidia runc
 Default Runtime: nvidia
 Init Binary: docker-init
 containerd version: 
 runc version: 
 init version: 
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.9.140-tegra
 Operating System: Ubuntu 18.04.4 LTS
 OSType: linux
 Architecture: aarch64
 CPUs: 4
 Total Memory: 3.871GiB
 Name: jetson1
 ID: HLZ4:DQKM:J7YY:OMDN:JXXZ:PFL5:YJGT:DJBM:SMSL:UTZA:WCZ4:GUD4
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
</code></pre>
<p>Any suggestions will be appreciated. Thank you!</p>

Kevin3297
<p>While runc is able to create containers, it's a rather low-level component. Most tools we know as container runtimes actually rely on it in some way. <a href="https://stackoverflow.com/questions/41645665/how-containerd-compares-to-runc">This answer to another question gives a great overview of it</a>.</p>
<p>The RuntimeClass feature in Kubernetes to target a specific conainer runtime requires it to implement the CRI (Container Runtime Interface) on the local nodes (the &quot;Setup&quot; part of your shared link briefly talks about it). I did some quick research and there is no hint that runc is implementing CRI directly. If it was, Kubernetes would skip accessing Docker as you did; it would use that interface to talk to another component directly from kubelet. Checking Docker settings therefore doesn't help to see if runc is a viable Kubernetes container runtime.</p>
<p>So, you should review why you're trying to do this - runc is likely already used in your default container rumtime stack without you maybe realizing it. Kubernetes has documentation <a href="https://kubernetes.io/docs/setup/production-environment/container-runtimes/" rel="nofollow noreferrer">for alternative container runtimes</a>, you can look into installing these if you are looking for something more lightweight than Docker.</p>
