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.

Can't enable modules (Raspberry Pi OS Stretch ARM64)

See original GitHub issue

I’ve installed it using the latest Raspberry Pi OS for ARM64 on a Raspberry Pi 3 Model B.

It looks like it’s installed and “running”, but as soon as I try to enable any module, it fails to execute the given command.

For example, this is for DNS:

 microk8s enable dns
Traceback (most recent call last):
  File "/snap/microk8s/2217/scripts/wrappers/enable.py", line 43, in <module>
    enable(prog_name='microk8s enable')
  File "/snap/microk8s/2217/usr/lib/python3/dist-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/snap/microk8s/2217/usr/lib/python3/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/snap/microk8s/2217/usr/lib/python3/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/snap/microk8s/2217/usr/lib/python3/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/snap/microk8s/2217/scripts/wrappers/enable.py", line 36, in enable
    enabled_addons, _ = get_status(get_available_addons(get_current_arch()), True)
  File "/snap/microk8s/2217/scripts/wrappers/status.py", line 157, in get_status
    kube_output = kubectl_get("all")
  File "/snap/microk8s/2217/scripts/wrappers/common/utils.py", line 166, in kubectl_get
    return run("kubectl", kubeconfig, "get", cmd, "--all-namespaces", die=False)
  File "/snap/microk8s/2217/scripts/wrappers/common/utils.py", line 39, in run
    result.check_returncode()
  File "/snap/microk8s/2217/usr/lib/python3.5/subprocess.py", line 659, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '('kubectl', '--kubeconfig=/var/snap/microk8s/2217/credentials/client.config', 'get', 'all', '--all-namespaces')' returned non-zero exit status 1

It happens the same with Dashboard.

Inspection Report

inspection-report-20210601_230905.tar.gz

Hardware

  • Raspberry Pi 3 Model B (with 1 GB of RAM)
  • Micro SD of 64 GB, 80% free.

Can someone, please, verify that microk8s is working in a Pi 3 like mine?

Operating System

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.10.17-v8+ #1421 SMP PREEMPT Thu May 27 14:01:37 BST 2021 aarch64 GNU/Linux

More info

I have tried with the latest Ubuntu Server for Raspberry Pi and I get the very same issue. I followed the official tutorial here: https://ubuntu.com/tutorials/how-to-kubernetes-cluster-on-raspberry-pi#1-overview

Important

The official tutorial says that the minimum Pis required is 2. I guess this isn’t strictly required, as this should also work with one Pi.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
balchuacommented, Jun 1, 2021

Pi 3B with 1GB ram? Its probably crashing due to OOM. You may get a bit of hope by enabling swap, but thats something kubernetes isn’t recommending.

0reactions
sed-icommented, Apr 1, 2022

I observed a CalledProcessError on a multipass blueprint when tried to enable the dns addon:

Traceback (most recent call last):
  File "/snap/microk8s/3052/scripts/wrappers/enable.py", line 43, in <module>
    enable(prog_name="microk8s enable")
  File "/snap/microk8s/3052/usr/lib/python3/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/snap/microk8s/3052/usr/lib/python3/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/snap/microk8s/3052/usr/lib/python3/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/snap/microk8s/3052/usr/lib/python3/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/snap/microk8s/3052/scripts/wrappers/enable.py", line 36, in enable
    enabled_addons, _ = get_status(get_available_addons(get_current_arch()), True)
  File "/snap/microk8s/3052/scripts/wrappers/status.py", line 158, in get_status
    kube_output = kubectl_get("all,ingress")
  File "/snap/microk8s/3052/scripts/wrappers/common/utils.py", line 169, in kubectl_get
    return run("kubectl", kubeconfig, "get", cmd, "--all-namespaces", die=False)
  File "/snap/microk8s/3052/scripts/wrappers/common/utils.py", line 39, in run
    result.check_returncode()
  File "/snap/microk8s/3052/usr/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '('kubectl', '--kubeconfig=/var/snap/microk8s/3052/credentials/client.config', 'get', 'all,ingress', '--all-namespaces')' returned non-zero exit status 1.
The connection to the server 127.0.0.1:16443 was refused - did you specify the right host or port?

microk8s v1.23.5 on Ubuntu 20.04.4 on multipass (amd64).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't install packages on 64-bit Raspberry Pi OS
If it was the arm64 Beta OS it wouldn't have Stretch in sources. It also wouldn't be trying to install arm packages. Post...
Read more >
Could nf_tables be enabled in raspbian · Issue #2177 - GitHub
Hello all, the module for nf_tables (and it's possible dependencies) is not loaded in the latest Raspbian Stretch. I thought it would be...
Read more >
[Step-By-Step Tutorial/Guide] Raspberry Pi with UniFi ...
This is a step-by-step tutorial for anyone looking for a straight forward installation of both the UniFi Controller and Pi-hole (Advertisement Blocking DNS ......
Read more >
Remote Development with Linux - Visual Studio Code
Ubuntu 64-bit x86, ARMv8l (AArch64) (16.04+, IoT 18.04+); Debian 64-bit x86, ARMv8l (AArch64) (Stretch/9+); Raspberry Pi OS ARMv7l (AArch32) 32-bit ...
Read more >
So Bullseye can't use exfat? - Debian User Forums
On a quick check by ssh to a Buster Raspberry Pi I see no mention of ... 7.31) [ 6.451723] systemd[1]: Starting Load...
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