Change feature-gates without Kubeadm

Cluster information:

Kubernetes version: v1.15
Installation method: Rancher
Host OS: CentOS

Hello,

I’d like to change some feature-gates on my K8s cluster.

All the config files or cmd I’ve seen are related with kubeadm.

Is it possible to change them through kubectl or something else ?
We launch our cluster with Rancher 2+

Regards

1 Like

You can’t change feature gates dynamically. If you’d prefer not to change it with kubeadm you can edit the manist for the component itself (/etc/kubernetes/manifests for kubeadm provisioned clusters) and restart the service.

1 Like

Thank you very much.

I managed to update some feature gates parameters through the API.
However the error message is pretty clear :

log: unknown flag: --ExpandCSIVolumes]

My K8s cluster version is 1.15 and this feature gate is referenced in K8s doc.

Do you have any idea of the reason of this error message ?

I could create a new topic.

Regards

To enable feature gates it should be something like this:

--feature-gates=ExpandCSIVolumes=true

Did you use that syntax and the error still popped up?

Hi there,

The syntax I used wasn’t correct indeed.

Here is what I used with rancher UI :

    kube-api:
  always_pull_images: false
  extra_args:
    allow-privileged: 'true'
    feature-gates: >-
      ExpandCSIVolumes=true,ExpandInUsePersistentVolumes=true,CSIInlineVolume=true,VolumePVCDataSource=true
  pod_security_policy: false
  service_node_port_range: 30000-32767
kube-controller: {}
kubelet:
  extra_args:
    feature-gates: >-
      ExpandCSIVolumes=true,ExpandInUsePersistentVolumes=true,CSIInlineVolume=true,VolumePVCDataSource=true