我正在尝试测试minikube上的Pod预设。我运行以下命令来启动minikube:
minikube start --vm-driver hyperv --hyperv-virtual-switch 交换机名称 --extra-config = apiserver.admission-control =“ NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass, DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,PodPreset”
集群启动后,我将运行kubectl get podpreset
,这将使我回到the server doesn't have a resource type 'podpreset'
。我的印象是,我只需要将PodPreset添加到准入控制中,然后Pod预设就可以使用。有人有建议吗?
一些其他信息:
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"}
答案 0 :(得分:0)
检查Minikube如何启动其Kubeapiserver:请参阅“ Kubernetes PodPreset not working”。
您需要选中“ Enable Pod Preset”,尤其是:
您已启用API类型
settings.k8s.io/v1alpha1/podpreset
。
例如,可以通过在API服务器的settings.k8s.io/v1alpha1=true
选项中包含--runtime-config
来完成此操作。