<p>Is there a way to inspect a container running in pod directly from the kubernetes command line (using kubectl) to see some details such as running in priveleged mode for instance.
something like:</p>
<pre><code>kubectl inspect -c &lt;containerName&gt;
</code></pre>
<p>The only way I found is to ssh to the node hosting the pod and perform a <code>docker inspect &lt;containerID&gt;</code> but this is kind of tedious.</p>
<p>My kubernetes version</p>
<pre><code>$ kubectl version
Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;10&quot;, GitVersion:&quot;v1.10.0&quot;, GitCommit:&quot;fc32d2f3698e36b93322a3465f63a14e9f0eaead&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2018-03-26T16:55:54Z&quot;, GoVersion:&quot;go1.9.3&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}
Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;10&quot;, GitVersion:&quot;v1.10.0+coreos.0&quot;, GitCommit:&quot;6bb2e725fc2876cd94b3900fc57a1c98ca87a08b&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2018-04-02T16:49:31Z&quot;, GoVersion:&quot;go1.9.3&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}
</code></pre>

Abdelghani
<p>Check <code>kubectl describe pods/&lt;pod_name&gt;</code></p>
<p>If it is not enough for you, you can go for JSON and filter it with <code>jq</code></p>
<p><code>kubectl get &lt;pod_name&gt; -ojson | jq '.spec.containers[] | .securityContext'</code></p>
<p>Also, check <a href="https://kubernetes.io/docs/reference/kubectl/cheatsheet/" rel="nofollow noreferrer">kubectl Cheat Sheet</a></p>
