microk8s на LXC: служба snap.microk8s.daemon-proxy не запущена

Установил microk8s в контейнер LXD

       snap install microk8s --classic

Когда я проверяю экземпляр, он показывает, что snap.microk8s.daemon-proxy не запущен.

       root@mk8s1:~# microk8s inspect
Inspecting Certificates
Inspecting services
  Service snap.microk8s.daemon-cluster-agent is running
  Service snap.microk8s.daemon-containerd is running
  Service snap.microk8s.daemon-apiserver is running
  Service snap.microk8s.daemon-apiserver-kicker is running
 FAIL:  Service snap.microk8s.daemon-proxy is not running
For more details look at: sudo journalctl -u snap.microk8s.daemon-proxy
  Service snap.microk8s.daemon-kubelet is running
  Service snap.microk8s.daemon-scheduler is running
  Service snap.microk8s.daemon-controller-manager is running
  Copy service arguments to the final report tarball
Inspecting AppArmor configuration
Gathering system information
  Copy processes list to the final report tarball
  Copy snap list to the final report tarball
  Copy VM name (or none) to the final report tarball
  Copy disk usage information to the final report tarball
  Copy memory usage information to the final report tarball
  Copy server uptime to the final report tarball
  Copy current linux distribution to the final report tarball
  Copy openSSL information to the final report tarball
  Copy network configuration to the final report tarball
Inspecting kubernetes cluster
  Inspect kubernetes cluster

Building the report tarball
  Report tarball is at /var/snap/microk8s/1769/inspection-report-20201110_051804.tar.gz
root@mk8s1:~# 

Как мне установить microk8s в контейнере LXD? Вот что я сделал. Создать профиль

       lxc profile copy default microk8s
cat microk8s.profile | lxc profile edit microk8s

Профиль выглядит следующим образом

       name: microk8s
config:
  boot.autostart: "true"
  linux.kernel_modules: ip_vs,ip_vs_rr,ip_vs_wrr,ip_vs_sh,ip_tables,ip6_tables,netlink_diag,nf_nat,overlay,br_netfilter
  raw.lxc: |
    lxc.apparmor.profile=unconfined
    lxc.mount.auto=proc:rw sys:rw cgroup:rw
    lxc.cgroup.devices.allow=a
    lxc.cap.drop=
  security.nesting: "true"
  security.privileged: "true"
description: ""
devices:
  aadisable:
    path: /sys/module/nf_conntrack/parameters/hashsize
    source: /sys/module/nf_conntrack/parameters/hashsize
    type: disk
  aadisable1:
    path: /sys/module/apparmor/parameters/enabled
    source: /dev/null
    type: disk
  aadisable2:
    path: /dev/kmsg
    source: /dev/kmsg
    type: disk

Запускаем контейнер mk8s1

       lxc launch -p default -p microk8s ubuntu:18.04 mk8s1

В контейнере запустить

       apt update && apt dist-upgrade -y && apt install squashfuse -y
snap install microk8s --classic

Что мне здесь не хватает?

1 ответ

ХОРОШО. Нашел решение этой проблемы в LXC, которое работает для меня

https://github.com/ubuntu/microk8s/issues/1438

Попробуйте добавить --conntrack-max-per-core=0в /var/snap/microk8s/current/args/kube-proxyи перезапуск микрок8с

Другие вопросы по тегам