Setup the feature gate RuntimeClass in kube-apiserver

12/13/2018

I want to setup the feature gates argument in the apiserver pod. How I can do it? I have triedit it by using the solution from here:

apiVersion: kubeadm.k8s.io/v1alpha1
kind: MasterConfiguration
apiServerExtraArgs:
  feature-gates: "RuntimeClass=true"

But it is not working:

kubectl apply -f update_api_server.yaml 
error: unable to recognize "update_api_server.yaml": no matches for kind "MasterConfiguration" in version "kubeadm.k8s.io/v1alpha1"

I'm using k8s v1.13.0. Thanks

-- Jorgese
configuration
kubernetes
kubernetes-apiserver

1 Answer

12/13/2018

It can be done directly in /etc/kubernetes/manifests/kube-apiserver.yaml. Adding this line to the command: - --feature-gates=RuntimeClass=true

-- Jorgese
Source: StackOverflow