当我尝试snap install microk8s
在 LXD 机器上运行时,它无法启动并产生以下错误:
sysop@hoseplavm:~$ lxc list
+------------+---------+----------------------+------+------------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+------------+---------+----------------------+------+------------+-----------+
| kubernetes | RUNNING | 10.144.28.123 (eth0) | | PERSISTENT | |
+------------+---------+----------------------+------+------------+-----------+
sysop@hoseplavm:~$ lxc exec kubernetes bash
root@kubernetes:~# microk8s.inspect
Inspecting services
Service snap.microk8s.daemon-containerd is running
Service snap.microk8s.daemon-apiserver is running
FAIL: Service snap.microk8s.daemon-proxy is not running
For more details look at: sudo journalctl -u snap.microk8s.daemon-proxy
FAIL: Service snap.microk8s.daemon-kubelet is not running
For more details look at: sudo journalctl -u snap.microk8s.daemon-kubelet
Service snap.microk8s.daemon-scheduler is running
Service snap.microk8s.daemon-controller-manager is running
Service snap.microk8s.daemon-etcd is running
Copy service arguments to the final report tarball
Inspecting AppArmor configuration
Gathering system info
Copy network configuration to the final report tarball
Copy processes list to the final report tarball
Copy snap list to the final report tarball
Inspect kubernetes cluster
Building the report tarball
Report tarball is at /var/snap/microk8s/522/inspection-report-20190604_133500.tar.gz
root@kubernetes:~#
是否可以在 LXD 容器内安装 microk8s?
可以使用正确的配置文件在 LXD 中运行 MicroK8s。看看https://github.com/ubuntu/microk8s/tree/master/tests/lxc。我们跨不同发行版的测试使用 lxc 容器。
请注意,上述配置文件授予的权限太宽。这是我们打算在未来解决的问题。