<p>How can I enable feature gates for my cluster in  Rancher 2.0? I am in need of enabling the <code>--feature-gates MountPropagation=true</code>. This will enable me to use storage solutions like StorageOS, CephFS, etc</p>

<p>There are 2 use cases here : </p>

<ol>
<li>If the Rancher is setup already and running?</li>
<li>If I am setting up the cluster from scratch?</li>
</ol>

<p>Hello and hope this helps someone, After much googling and help from awesome people at Rancher I got the solution for this.
Here is what you can do to set the feature gates flags for the Kubernetes engine RKE.</p>

<p>step 1: Open Rancher2.0 UI</p>

<p>step 2: View cluster in API</p>

<p><a href="https://i.stack.imgur.com/5Atxp.png" rel="noreferrer"><img src="https://i.stack.imgur.com/5Atxp.png" alt="enter image description here"></a></p>

<p>step 3: Click edit and modify the <code>rancherKubernetesEngineConfig</code> input box </p>

<p><a href="https://i.stack.imgur.com/hXv6N.png" rel="noreferrer"><img src="https://i.stack.imgur.com/hXv6N.png" alt="enter image description here"></a></p>

<ul>
<li>Find the services key.</li>
<li><p>Then add extra args for kubelet in below format</p>

<pre><code>"services": {
"etcd": { "type": "/v3/schemas/etcdService" },
"kubeApi": {
    "podSecurityPolicy": false,
    "type": "/v3/schemas/kubeAPIService",
    "extraArgs": { "feature-gates": "PersistentLocalVolumes=true, VolumeScheduling=true,MountPropagation=true" }
},
"kubeController": { "type": "/v3/schemas/kubeControllerService" },
"kubelet": {
    "failSwapOn": false,
    "type": "/v3/schemas/kubeletService",
    "extraArgs": { "feature-gates": "PersistentLocalVolumes=true, VolumeScheduling=true,MountPropagation=true" }
}
</code></pre></li>
</ul>

<p>step 4: Click show request .. you get a curl command and json request.</p>

<p>step 5: Verify the request body data which will be shown. </p>

<p>step 6: Make sure the key's which are not applicable are set to null. e.g <code>amazonElasticContainerServiceConfig</code>, <code>azureKubernetesServiceConfig</code>, <code>googleKubernetesEngineConfig</code> all need to null for me.</p>

<p>step 7: Click send request</p>

<p>You should get a response with status code 201. And your cluster will start updating. You can verify that your cluster RKE has updated by viewing the Cluster in API again.</p>
