Pod presets not working on minikube

7/2/2018

I'm trying to test out pod presets on minikube. I run the following command to start minikube:

minikube start --vm-driver hyperv --hyperv-virtual-switch switch name --extra-config=apiserver.admission-control="NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,PodPreset"

Once the cluster starts up, I run kubectl get podpreset, which gives me back the server doesn't have a resource type 'podpreset'. I was under the impression that I just had to add PodPreset to admission control and then pod presets would work. Does anyone have any suggestions?

Some additional info:

OS: Windows 10

minikube version: v0.28.0

kubectl version: 

Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"clean", BuildDate:"2018-05-21T09:17:39Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"windows/amd64"}

Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.0", GitCommit:"fc32d2f3698e36b93322a3465f63a14e9f0eaead", GitTreeState:"clean", BuildDate:"2018-03-26T16:44:10Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
-- R Wood
kubernetes
kubernetes-apiserver
minikube

1 Answer

7/3/2018

Check how Minikube is starting its Kubeapiserver: see "Kubernetes PodPreset not working".

You need to check "Enable Pod Preset", especially:

You have enabled the API type settings.k8s.io/v1alpha1/podpreset.
For example, this can be done by including settings.k8s.io/v1alpha1=true in the --runtime-config option for the API server.

-- VonC
Source: StackOverflow