Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update command examples from "Install MicroK8s" section #646

Open
neitsab opened this issue Apr 24, 2024 · 1 comment · May be fixed by #660
Open

Update command examples from "Install MicroK8s" section #646

neitsab opened this issue Apr 24, 2024 · 1 comment · May be fixed by #660

Comments

@neitsab
Copy link

neitsab commented Apr 24, 2024

Summary

The command examples provided at https://microk8s.io/#install-microk8s don't match the experience on a fresh Ubuntu Server 22.04.4 install:

  • prepending sudo is required for all microk8s invocations
  • the dns addon is enabled by default
  • the istio addon isn't spontaneously available anymore.

Process

  • install a fresh ubuntu-server-22.04.4 (tested with aarch64 and amd64) choosing default options
  • once logged in after the reboot, follow the steps at https://microk8s.io/#install-microk8s

Current and expected result

First we observe that sudo is required for microk8s invocation:

$ microk8s status --wait-ready
Insufficient permissions to access MicroK8s.
You can either try again with sudo or add the user neitsab to the 'microk8s' group:

    sudo usermod -a -G microk8s neitsab
    sudo chown -R neitsab ~/.kube

After this, reload the user groups either via a reboot or by running 'newgrp microk8s'.

Secondly, that the dns addon is already enabled by default so trying to enable it manually proves redundant:

$ sudo microk8s status --wait-ready
microk8s is running
high-availability: no
  datastore master nodes: 127.0.0.1:19001
  datastore standby nodes: none
addons:
  enabled:
    dns                  # (core) CoreDNS
    ha-cluster           # (core) Configure high availability on the current node
    helm                 # (core) Helm - the package manager for Kubernetes
    helm3                # (core) Helm 3 - the package manager for Kubernetes

$ sudo microk8s enable dns
Infer repository core for addon dns
Addon core/dns is already enabled

Finally, that the istio addon isn't in the core repository anymore, leading to two different outcomes depending on the architecture:

  • on aarch64 it simply says it wasn't found:
$ sudo microk8s enable istio
Addon istio was not found in any repository
  • on amd64 it suggests enabling the community repo :
$ sudo microk8s enable istio
Addon istio was not found in any repository
To use the community maintained flavor enable the respective repository:

    microk8s enable community

Versions

  • Ubuntu 22.04.4 LTS on both GNU/Linux 5.15.0-105-generic x86_64 or GNU/Linux 6.5.0-1021-oracle aarch64
  • microk8s (1.29/stable) v1.29.2 from Canonical✓ installed
@neitsab neitsab changed the title Update service examples from "Install MicroK8s" section Update command examples from "Install MicroK8s" section Apr 24, 2024
@neitsab
Copy link
Author

neitsab commented Apr 24, 2024

Regarding the requirement for elevated permissions to use microk8s, as an alternative to using sudo, instructions could be copied from https://ubuntu.com/kubernetes/install#tab-linux__content to "add your user to the microk8s admin group":

MicroK8s creates a group to enable seamless usage of commands which require admin privilege. Use the following commands to join the group:

sudo usermod -a -G microk8s $USER

sudo chown -f -R $USER ~/.kube

You will also need to re-enter the session for the group update to take place:

su - $USER

@evilnick evilnick linked a pull request Sep 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant