For the implementation of https://github.com/kubevirt/kubevirt/pull/652, a change is required to core Kubernetes. Because the initializers feature of Kubernetes is still alpha, in order to use it, a flag passed to kube-apiserver is required to enable it.
--runtime-config=admissionregistration.k8s.io/v1alpha1
This is currently being implemented as a call to patch to edit /etc/kubernetes/manifests/kube-apiserver.yaml inside each vagrant node, however I believe there's a more programmatic means of passing in command line flags.
@stu-gott have a look here: https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-init/#custom-args
Thanks @rmohr. For anybody else looking into this, there is no command line flag to kubeadm to add extra arguments to the various components. The only mechanism for doing so is to provide a kubeadm config file. Command line arguments cannot be mixed in--if you switch to using a config, all parameters must be passed in that way.
apiVersion: kubeadm.k8s.io/v1alpha1
kind: MasterConfiguration
apiServerExtraArgs:
runtime-config: admissionregistration.k8s.io/v1alpha1
pod-network-cidr: 10.244.0.0/16
For my case:
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.1", GitCommit:"4ed3216f3ec431b140b1d899130a69fc671678f4", GitTreeState:"clean", BuildDate:"2018-10-05T16:46:06Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.1", GitCommit:"4ed3216f3ec431b140b1d899130a69fc671678f4", GitTreeState:"clean", BuildDate:"2018-10-05T16:36:14Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"}
I have edited the file /etc/kubernetes/manifests/kube-apiserver.yaml. For example, I have enabled DefaultStorageClass
- --enable-admission-plugins=NodeRestriction,DefaultStorageClass
Then,
docker rm -f `docker ps | grep apiserver | awk '{print $1}'`
systemctl restart kubelet
Most helpful comment
For my case:
I have edited the file
/etc/kubernetes/manifests/kube-apiserver.yaml. For example, I have enabledDefaultStorageClassThen,