microk8s: Facing microk8s is not running issue.No resources found in default namespace showing for microk8s.kubectl get nodes

I am trying to set up microk8s multi-node cluster on my Centos machine. But when i run microk8s.status it’s showing microk8s is not running. Use microk8s inspect for a deeper inspection and For microk8s.kubectl get nodes is showing No resources found in default namespace. The output of microk8s inspect is

Inspecting Certificates
Inspecting services
  Service snap.microk8s.daemon-cluster-agent is running
  Service snap.microk8s.daemon-flanneld is running
  Service snap.microk8s.daemon-containerd is running
  Service snap.microk8s.daemon-apiserver is running
  Service snap.microk8s.daemon-apiserver-kicker is running
  Service snap.microk8s.daemon-proxy is running
  Service snap.microk8s.daemon-kubelet is running
  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 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

 WARNING:  IPtables FORWARD policy is DROP. Consider enabling traffic forwarding with: sudo iptables -P FORWARD ACCEPT
The change can be made persistent with: sudo apt-get install iptables-persistent
Building the report tarball

snap    2.45.3.1-1.el7
snapd   2.45.3.1-1.el7
series  16
centos  7
kernel  3.10.0-1062.12.1.el7.x86_64

I am using microk8s v1.18.8 1609 1.18/stable canonical✓ classic

Attaching microk8s.inspect tarball inspection-report-20200915_045010.tar.gz

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (4 by maintainers)

Most upvoted comments

Thanks a lot @ktsakalozos . That worked. I have reformatted the directory /var/snap and cluster is up now … by the way i did the same on one of my node and node is able to join the cluster now .

NAME    STATUS   ROLES    AGE   VERSION
appz2   Ready    <none>   76m   v1.19.0-34+09a4aa08bb9e93
appz1   Ready    <none>   97m   v1.19.0-34+09a4aa08bb9e93

@ppratheesh What exactly did you do to “reformat” the /var/snap directory? I am having the same problem and want to see if this resolves my issues.

Thanks a lot @ktsakalozos . That worked. I have reformatted the directory /var/snap and cluster is up now … by the way i did the same on one of my node and node is able to join the cluster now .

NAME    STATUS   ROLES    AGE   VERSION
appz2   Ready    <none>   76m   v1.19.0-34+09a4aa08bb9e93
appz1   Ready    <none>   97m   v1.19.0-34+09a4aa08bb9e93

It looks like the same issue as in https://github.com/rancher/k3s/issues/495#issuecomment-496366229 . Lets fix the xfs d_type=true before we address any networking issues we have. You could try to edit /var/snap/microk8s/current/args/containerd and /var/snap/microk8s/current/args/kubelet and point containerd in a directory on a different file system. Or I would recommend you reformat the directory already in used by snaps (/var/snap).