尝试在本地 PC 中启用 RBAC 时出现 Minikube 运行 异常

Minikube Running exception when try to enable RBAC in Local PC

我尝试运行这个命令来启动minikube:

minikube start \
         --extra-config=apiserver.Authorization.Mode=RBAC \
         --extra-config=kubelet.cgroup-driver=systemd \
         --driver=docker

也试试,

minikube start \
         --extra-config=apiserver.Authorization.Mode=RBAC \
         --driver=docker

但是它给我错误。
我该如何解决这个问题......?

错误喜欢:

stderr:
    [WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
    [WARNING Swap]: running with swap on is not supported. Please disable swap
    [WARNING SystemVerification]: this Docker version is not on the list of validated versions: 20.10.7. Latest validated version: 19.03
    [WARNING SystemVerification]: failed to parse kernel config: unable to load kernel module: "configs", output: "modprobe: FATAL: Module configs not found in directory /lib/modules/5.4.0-84-generic\n", err: exit status 1
    [WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
error execution phase wait-control-plane: couldn't initialize a Kubernetes cluster
To see the stack trace of this error execute with --v=5 or higher

尝试使用 --bootstrapper=kubeadm 启动 minikube,这将为您启用 RBAC

# Start minikube with kubeadm (Its the default so it's not mandatory)
minikube start --bootstrapper=kubeadm

# Create the default role binding [kube-system:default]
kubectl create clusterrolebinding \
        add-on-cluster-admin \
        --clusterrole=cluster-admin \
        --serviceaccount=kube-system:default