尽管我属于microk8s
OS 组并具有本地配置文件的 rx 访问权限,但我无法执行需要提升权限的 microK8s 命令。
$ groups
gary adm cdrom sudo dip plugdev lpadmin lxd sambashare docker microk8s
$ ls -la ~/.kube
total 12
drwxr-x--- 3 gary microk8s 4096 Oct 10 09:23 .
drwxr-x--- 27 gary gary 4096 Oct 14 16:46 ..
drwxr-x--- 4 gary microk8s 4096 Oct 10 09:23 cache
$ microk8s status
Insufficient permissions to access MicroK8s.
You can either try again with sudo or add the user gary to the 'microk8s' group:
sudo usermod -a -G microk8s gary
sudo chown -f -R gary ~/.kube
After this, reload the user groups either via a reboot or by running 'newgrp microk8s'.
我执行了它建议的命令,并重启了很多次。有人能告诉我为什么 microK8s 没有授予我权限吗?
使用 Ubuntu 22.4