question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No node created when installing microk8s

See original GitHub issue

Install microk8s, and unfortunately there was no Nodes inside the cluster, and therefore no Pods could be started.

When running:

$ microk8s.kubectl get nodes
No resources found.

Also when running

$  microk8s.kubectl get nodes
No resources found.

All Pods failed with the message: Warning FailedScheduling 6s (x37 over 10m) default-scheduler no nodes available to schedule pods

As per this article, I stopped Docker and reinstalled the snap, and started it again, but that did not solve the issue.

You can see the video of my attempt on Twitch for next 14 days, so you can see all the steps and workarounds I took.

I’ll add the Youtube version when it’s uploaded, so it’s here forever.


OS: Debian, Stretch

Docker Version: Client: Version: 18.03.0-ce API version: 1.37 Go version: go1.9.4 Git commit: 0520e24 Built: Wed Mar 21 23:10:06 2018 OS/Arch: linux/amd64 Experimental: false Orchestrator: swarm

Server: Engine: Version: 18.03.0-ce API version: 1.37 (minimum version 1.12) Go version: go1.9.4 Git commit: 0520e24 Built: Wed Mar 21 23:08:35 2018 OS/Arch: linux/amd64 Experimental: false

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
ktsakalozoscommented, Jun 1, 2018

The docker logs were very helpful. snap.microk8s.daemon-docker.service attempts to get its configuration from the default location /etc/docker/daemon.json this results in reading the config parameters of the already installed dockerd. It complains that the data-root is not known since this config argument replaced the graph parameter.

The quick fix is to not use the /etc/docker/daemon.json:

sudo sh -c "echo '{}' > /var/snap/microk8s/common/daemon.json"
sudo sh -c "echo '--config-file=\$SNAP_COMMON/daemon.json' >> /var/snap/microk8s/55/args/dockerd"
sudo systemctl restart snap.microk8s.daemon-docker.service
sudo systemctl restart snap.microk8s.daemon-kubelet.service

We will soon have this fix on edge, PR is on its way. Ultimately, this will be handles when we move all services to strict confinement.

1reaction
ktsakalozoscommented, Jun 1, 2018

The fix is released in edge and will hit beta soon.

We ship our own docker because of how snaps are supposed to work. Snaps pack the entire software stack they will need so that they can be deployed on any distribution and release. Its like docker containers, they package everything needed by the application and they run everywhere. If we tried to reuse the dockerd installed (if any) we would have to deal with whichever docker version the user has available.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No node created when installing microk8s · Issue #36 - GitHub
Install microk8s, and unfortunately there was no Nodes inside the cluster, and therefore no Pods could be started. When running: $ microk8s.
Read more >
Create a MicroK8s cluster
Adding a node. To create a cluster out of two or more already-running MicroK8s instances, use the microk8s add-node command. · Removing a...
Read more >
Troubleshooting - MicroK8s
If a pod is not behaving as expected, the first port of call should be the logs. First determine the resource ... Node...
Read more >
Get started - MicroK8s
One node not enough? Try setting up a MicroK8s cluster. Want to experiment with alpha releases of Kubernetes? See the documentation on setting...
Read more >
High Availability (HA) - MicroK8s
High availability is automatically enabled on MicroK8s for clusters with three or more nodes. A highly available Kubernetes cluster is a cluster that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found