Microk8s: Remove basic-auth-file it is deprecated

Created on 9 Nov 2019  路  6Comments  路  Source: ubuntu/microk8s

We should remove the basic-auth-file argument and move any entries to the tokens file.

good first issue help wanted inactive

Most helpful comment

@vbmade2000 there is no architectural doc. To understand how we setup a cluster, fist look at the basics of snaps [1] (MicroK8s is a snap package). Then read through the daemons and commands defined in spancraft.yaml [2]. The commands and daemons are wrappers [3] around the (k8s) binaries we package.

The single node cluster is straight forward as the daemons start with the default arguments [4] and the certificates generated during installation [5, 6]. The case of forming a cluster is a bit more involving so a few python scripts are used [7].

You are however on point, we need to put more time and effort on the dev docs.

[1] https://tutorials.ubuntu.com/tutorial/create-your-first-snap#0
[2] https://github.com/ubuntu/microk8s/blob/master/snapcraft.yaml#L19
[3] https://github.com/ubuntu/microk8s/tree/master/microk8s-resources/wrappers
[4] https://github.com/ubuntu/microk8s/tree/master/microk8s-resources/default-args
[5] https://github.com/ubuntu/microk8s/blob/master/snap/hooks/install
[6] https://github.com/ubuntu/microk8s/blob/master/snap/hooks/configure
[7] https://github.com/ubuntu/microk8s/tree/master/scripts/cluster

All 6 comments

@ktsakalozos I believe this is good issue to start with for beginner like me. Do you mind if I take this issue ?

Thank you for volunteering @vbmade2000. Yes, it is a good first issue to get you familiar with the code. Here are some notes you might find helpful.

  • In https://github.com/ubuntu/microk8s/tree/master/microk8s-resources/default-args we keep the default arguments that are copied under /var/snap/microk8s/current/args upon installation. You should remove the basic-auth-file entry (https://github.com/ubuntu/microk8s/blob/master/microk8s-resources/default-args/kube-apiserver#L4) from there.
  • The password created in the install script (https://github.com/ubuntu/microk8s/blob/master/snap/hooks/install#L24) should be added as a token to the known_tokens file as we do for example for the controller (https://github.com/ubuntu/microk8s/blob/master/snap/hooks/install#L47).

Do not hesitate to reach out in case you need help.

Many thanks.

Sounds good. Thanks.

Will check and reach out to you in case of query.

@ktsakalozos Can you please point me to the architectural docs for microk8s ? I checked https://microk8s.io/docs/ but looks like it shows usage mostly. I want to understand how it sets up a single node k8s cluster.

@vbmade2000 there is no architectural doc. To understand how we setup a cluster, fist look at the basics of snaps [1] (MicroK8s is a snap package). Then read through the daemons and commands defined in spancraft.yaml [2]. The commands and daemons are wrappers [3] around the (k8s) binaries we package.

The single node cluster is straight forward as the daemons start with the default arguments [4] and the certificates generated during installation [5, 6]. The case of forming a cluster is a bit more involving so a few python scripts are used [7].

You are however on point, we need to put more time and effort on the dev docs.

[1] https://tutorials.ubuntu.com/tutorial/create-your-first-snap#0
[2] https://github.com/ubuntu/microk8s/blob/master/snapcraft.yaml#L19
[3] https://github.com/ubuntu/microk8s/tree/master/microk8s-resources/wrappers
[4] https://github.com/ubuntu/microk8s/tree/master/microk8s-resources/default-args
[5] https://github.com/ubuntu/microk8s/blob/master/snap/hooks/install
[6] https://github.com/ubuntu/microk8s/blob/master/snap/hooks/configure
[7] https://github.com/ubuntu/microk8s/tree/master/scripts/cluster

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings