how do I enable mount propagation in Rancher - Kubernetes feature gates?

左心房为你撑大大i 提交于 2020-01-16 06:31:09

问题


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

There are 2 use cases here :

  1. If the Rancher is setup already and running?
  2. If I am setting up the cluster from scratch?

回答1:


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.

step 1: Open Rancher2.0 UI

step 2: View cluster in API

step 3: Click edit and modify the rancherKubernetesEngineConfig input box

  • Find the services key.
  • Then add extra args for kubelet in below format

    "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" }
    }
    

step 4: Click show request .. you get a curl command and json request.

step 5: Verify the request body data which will be shown.

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

step 7: Click send request

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.



来源:https://stackoverflow.com/questions/51336595/how-do-i-enable-mount-propagation-in-rancher-kubernetes-feature-gates

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!