4

我正在尝试在 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"}
4

1 回答 1

-1

检查 Minikube 如何启动其 Kubeapiserver:请参阅“ Kubernetes PodPreset not working ”。

您需要勾选“ Enable Pod Preset ”,尤其是:

您已启用 API 类型settings.k8s.io/v1alpha1/podpreset
例如,这可以通过包含settings.k8s.io/v1alpha1=true--runtime-configAPI 服务器的选项中来完成。

于 2018-07-03T05:01:24.430 回答