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 :)
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
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.
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.
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