<p>I want to run docker containers using real-time scheduler. Is it possible to pass parameters in pod/deployment file to Kubernetes to run my containers as follows?</p>

<pre><code>docker run -it --cpu-rt-runtime=950000 \
                  --ulimit rtprio=99 \
                  --cap-add=sys_nice \
                  debian:jessie
</code></pre>

Václav Struhár
<p>Unfortunately not all Docker command line features has relevant options in Kubernetes YAML.</p>

<p>While <code>sys_time</code> capability can be set using <code>securiyContext</code> in yaml, the <code>--cpu-rt-runtime=950000</code> cannot.</p>

<p>In the <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.16/#podsecuritycontext-v1-core" rel="nofollow noreferrer">K8s API Pod</a> documentation you can find all the configuration that can be pass into container
under <code>PodSecurityContext v1 core</code>.</p>

<p>Another thing is that I`ve tried to run a container itself with the specs that you provided but I ran into an error:</p>

<pre><code>docker: Error response from daemon: Your kernel does not support
cgroup cpu real-time runtime. See 'docker run --help'
</code></pre>

<p>This is related directly to kernel configuration named <code>CONFIG_RT_GROUP_SCHED</code> that is missing from your kernel image. Without it the <code>cpu-rt-runtime</code> won`t be possible to set to container.</p>
