3

the node of microk8s does not watn to start. Kube.system pods are stick at pending state. kubectl describe nodes says as Warning InvalidDiskCapacity. My Server has more than enough resources.

PODS:

NAMESPACE            NAME                                              READY   STATUS    RESTARTS   AGE
container-registry   registry-7cf58dcdcc-hf8gx                         0/1     Pending   0          5d
kube-system          coredns-588fd544bf-4m6mj                          0/1     Pending   0          5d
kube-system          dashboard-metrics-scraper-db65b9c6f-gj5x4         0/1     Pending   0          5d
kube-system          heapster-v1.5.2-58fdbb6f4d-q6plc                  0/4     Pending   0          5d
kube-system          hostpath-provisioner-75fdc8fccd-6mdvc             0/1     Pending   0          5d
kube-system          kubernetes-dashboard-67765b55f5-8xsh5             0/1     Pending   0          5d
kube-system          monitoring-influxdb-grafana-v4-6dc675bf8c-82fg4   0/2     Pending   0          5d

Describe node:

Normal   Starting                 72s                kubelet, h2860142.stratoserver.net     Starting kubelet.
  Warning  InvalidDiskCapacity      71s                kubelet, h2860142.stratoserver.net     invalid capacity 0 on image filesystem
  Normal   NodeHasSufficientPID     70s                kubelet, h2860142.stratoserver.net     Node h2860142.stratoserver.net status is now: NodeHasSufficientPID
  Normal   NodeHasNoDiskPressure    70s                kubelet, h2860142.stratoserver.net     Node h2860142.stratoserver.net status is now: NodeHasNoDiskPressure
  Normal   NodeHasSufficientMemory  70s                kubelet, h2860142.stratoserver.net     Node h2860142.stratoserver.net status is now: NodeHasSufficientMemory
  Warning  InvalidDiskCapacity      54s                kubelet, h2860142.stratoserver.net     invalid capacity 0 on image filesystem
  Normal   NodeHasSufficientMemory  54s                kubelet, h2860142.stratoserver.net     Node h2860142.stratoserver.net status is now: NodeHasSufficientMemory
  Normal   NodeHasNoDiskPressure    54s                kubelet, h2860142.stratoserver.net     Node h2860142.stratoserver.net status is now: NodeHasNoDiskPressure
  Normal   NodeHasSufficientPID     54s                kubelet, h2860142.stratoserver.net     Node h2860142.stratoserver.net status is now: NodeHasSufficientPID

How can I solve this problem?

Thank you :)

volkanb
  • 229
  • 3
  • 14
  • Could you share more information about your env? Its MicroK8s 1.18 or older? On which OS are you using this microk8s? Its your local env? Did you enable any addons before? Its new cluster or did you test something on it? Any steps to reproduce? – PjoterS Jun 15 '20 at 11:29

4 Answers4

3

I could find the solution for that issue. Well, that's not really a solution, but the answer is...I am hosting a VPS-Server on STRATO as hostingprovider. So in that case virtualisation is not possible. If I do not an upgrade to dedicated Server, I will never be able to run Kubernetes or Microk8s.

volkanb
  • 229
  • 3
  • 14
  • They say here Docker is running on e.g. ubuntu 20.04LTS https://www.strato.de/faq/server/welche-server-und-betriebssysteme-sind-docker-ready/ . But seems like people are having still problems with kubernetes and docker swarm. So Chanigin provider is the only option here – kenny Dec 06 '21 at 17:45
2

the problem is the service of snap.microk8s.daemon-kubelet. only you should restart of service

sudo systemctl restart snap.microk8s.daemon-kubelet
sudo systemctl status snap.microk8s.daemon-kubelet
bguiz
  • 27,371
  • 47
  • 154
  • 243
1

From the docs here steps when using ZFS filesystem

Stop microk8s

microk8s stop

Remove old state of containerd:

sudo rm -rf /var/snap/microk8s/common/var/lib/containerd

Configure containerd to use ZFS:

Edit the file /var/snap/microk8s/current/args/containerd-template.toml replacing snapshotter = "overlayfs" with snapshotter = "zfs"

Create new zfs dataset for containerd to use:

zfs create -o mountpoint=/var/snap/microk8s/common/var/lib/containerd/io.containerd.snapshotter.v1.zfs $POOL/containerd

Restart microk8s:

microk8s start
Arghya Sadhu
  • 41,002
  • 9
  • 78
  • 107
  • I get this error = ```modprobe: FATAL: Module zfs not found in directory /lib/modules/4.15.0``` – volkanb Jun 18 '20 at 09:32
  • 1
    I am not using a ZFS from what I can tell - I do, however, have a large ext4 volume and having this "invalid capacity 0 on image filesystem" issue – etrey Jan 14 '21 at 07:33
  • Also when I run the ZFS command I just get "cannot create '/containerd': leading slash in name" – etrey Jan 14 '21 at 07:36
  • 2
    No where in the question did the user say they were using ZFS. I think you should remove this answer. – Myers Carpenter Apr 26 '21 at 18:28
0

This happened to me when the hostname of the server had CAPITAL letters. We created a new VM with a lowercase name, and we did not see the problem.

From what I could tell, it had to do with certificate access and the machine names not matching.