<p>(I have looked at some other threads, but apparently the privilege mode is now supported in the latest code, so am wondering if I have hit a bug.)</p>

<p>I have two physical servers: both running Linux (ubuntu), with the latest kubernetes code from github yesterday. </p>

<p>I am running <code>docs/getting-started-guides/docker-multinode/master.sh</code> (&amp; <code>worker.sh</code>).</p>

<p>On Master node:</p>

<pre><code>$ kubectl create -f examples/nfs/nfs-server-rc.yaml
The ReplicationController "nfs-server" is invalid. 
spec.template.spec.containers[0].securityContext.privileged: forbidden '&lt;*&gt;(0xc208389770)true'
</code></pre>

<p>Question: Is this supported? Or am I doing something wrong. Or is this a bug, please?</p>

<p><code>master.sh</code> code already has the option <code>--allow-privileged=true</code> provided.</p>

<p>These following options were set, but not with a great conviction, and just because I saw some discussion elsewhere setting them.</p>

<pre><code>/etc/default/kubelet: 
    `KUBELET_OPTS="--allow_privileged=true"`

/etc/default/kube-apiserver: 
    `KUBE_APISERVER_OPTS="--allow_privileged=true"`
</code></pre>

<p>Master configuration:</p>

<pre><code>$ kubectl version
Client Version: version.Info{Major:"1", Minor:"2+", GitVersion:"v1.2.0-alpha.5.833+2e5da8b881e2f5", GitCommit:"2e5da8b881e2f5b6dfb66653acf4aaa1ca1f398e", GitTreeState:"clean"}
Server Version: version.Info{Major:"1", Minor:"1", GitVersion:"v1.1.3", GitCommit:"6a81b50c7e97bbe0ade075de55ab4fa34f049dc2", GitTreeState:"clean"}

$ docker version
Client:
Version:      1.9.1
API version:  1.21
Go version:   go1.4.2
Git commit:   a34a1d5
Built:        Fri Nov 20 13:12:04 UTC 2015
OS/Arch:      linux/amd64
Server:
Version:      1.9.1
API version:  1.21
Go version:   go1.4.2
Git commit:   a34a1d5
Built:        Fri Nov 20 13:12:04 UTC 2015
OS/Arch:      linux/amd64
</code></pre>

<p>From kubernetes v1.1, any container in a pod can enable privileged mode, using the privileged flag on the SecurityContext of the container spec. </p>

<p>To enable privileged mode nest <code>privileged:true</code> inside <code>securityContext</code> decleration of the container spec:</p>

<pre><code>"securityContext": {
    "privileged": true
</code></pre>

<p>And as Janet said set <code>--allow-privileged=true</code> for both kubelet and kube-apiserver and restart them:</p>

<pre><code>sudo /etc/init.d/kubelet restart
sudo /etc/init.d/kube-apiserver restart
</code></pre>

<p>and validate that the flags are changed by using <code>ps -ef | grep kube</code> command.</p>
