4

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"}
BMW
  • 42,880
  • 12
  • 99
  • 116
R Wood
  • 167
  • 1
  • 7

1 Answers1

-1

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
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I believe that minikube has all apis by default. See this [github issue](https://github.com/kubernetes/minikube/issues/316). – R Wood Jul 03 '18 at 15:42
  • @RWood OK, there must be another requirement missing then. – VonC Jul 03 '18 at 15:43
  • 1
    @RWood: Have you found any solution to this problem? I'm facing this too. – Rohan Kumar Dec 08 '18 at 13:26
  • Someone made a [suggestion](https://github.com/kubernetes/minikube/issues/2958#issuecomment-416160361) on the github issue that I created. I didn't get the chance to try it out yet, so I don't know if it works – R Wood Dec 12 '18 at 18:43