<p>I need to enable a few Feature Gates on my bare-metal K8s cluster(v1.13). I've tried using the kubelet flag <code>--config</code> to enable them, as <code>kubelet --feature-gates &lt;feature gate&gt;</code> throws an error saying that the feature has been deprecated.</p>

<p>I've created a .yml file with the following configuration:</p>

<pre><code>apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
feature-gates:
    VolumeSnapshotDataSource=true
</code></pre>

<p>and after running: "kubelet --config , I got the following error:</p>

<pre><code>I0119 21:59:52.987945   29087 server.go:417] Version: v1.14.2
I0119 21:59:52.988165   29087 plugins.go:103] No cloud provider specified.
W0119 21:59:52.988188   29087 server.go:556] standalone mode, no API client
F0119 21:59:52.988203   29087 server.go:265] failed to run Kubelet: no client provided, cannot use webhook authentication
</code></pre>

<p>Does anyone know what could be happening and how to fix this problem?</p>

Gaby
<p>You don't apply <code>--feature-gates</code> to the kubelet. You do it to the <code>API-server</code>. Depending on how have you installed kubernetes on bare metal, you would need to either stop <code>API-server</code>, edit the command you start it with and add the following parameter:</p>

<pre><code>--feature-gates=VolumeSnapshotDataSource=true
</code></pre>

<p>Or, if it is in a pod, find the manifest, edit it and re-deploy it (it should happen automatically, once you finish editing). It should look like this:</p>

<pre><code>...
  labels:
    component: kube-apiserver
    tier: control-plane
  name: kube-apiserver
  namespace: kube-system
spec:
  containers:
  - command:
    - kube-apiserver
    - --advertise-address=10.132.0.48
    - --allow-privileged=true
    - --authorization-mode=Node,RBAC
    - --client-ca-file=/etc/kubernetes/pki/ca.crt
    - --enable-admission-plugins=NodeRestriction
    - --enable-bootstrap-token-auth=true
    - --etcd-cafile=/etc/kubernetes/pki/etcd/ca.crt
    - --etcd-certfile=/etc/kubernetes/pki/apiserver-etcd-client.crt
    - --etcd-keyfile=/etc/kubernetes/pki/apiserver-etcd-client.key
    - --etcd-servers=https://127.0.0.1:2379
    - --insecure-port=0
    - --kubelet-client-certificate=/etc/kubernetes/pki/apiserver-kubelet-client.crt
    - --kubelet-client-key=/etc/kubernetes/pki/apiserver-kubelet-client.key
    - --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
    - --proxy-client-cert-file=/etc/kubernetes/pki/front-proxy-client.crt
    - --proxy-client-key-file=/etc/kubernetes/pki/front-proxy-client.key
    - --requestheader-allowed-names=front-proxy-client
    - --requestheader-client-ca-file=/etc/kubernetes/pki/front-proxy-ca.crt
    - --requestheader-extra-headers-prefix=X-Remote-Extra-
    - --requestheader-group-headers=X-Remote-Group
    - --requestheader-username-headers=X-Remote-User
    - --secure-port=6443
    - --service-account-key-file=/etc/kubernetes/pki/sa.pub
    - --service-cluster-ip-range=10.96.0.0/12
    - --tls-cert-file=/etc/kubernetes/pki/apiserver.crt
    - --tls-private-key-file=/etc/kubernetes/pki/apiserver.key
    - --feature-gates=VolumeSnapshotDataSource=true
    image: k8s.gcr.io/kube-apiserver:v1.16.4
    imagePullPolicy: IfNotPresent
    livenessProbe:
      failureThreshold: 8
      httpGet:
        host: 10.132.0.48
        path: /healthz
        port: 6443
        scheme: HTTPS
...
</code></pre>
