Closed f-bn closed 3 months ago
Hi @f-bn
Thank you for reporting this. The issue is with the persistentClusterToken
line. We try to append the provided token but the token's file is not created yet.
As a temporary workaround while we patch and release the fix for the problem you can set the persistentClusterToken
after the installation of the snap:
With:
$ sudo cat /etc/microk8s.yaml
---
version: 0.1.0
extraKubeAPIServerArgs:
--authorization-mode: RBAC,Node
extraKubeletArgs:
--cluster-dns: 10.152.183.10
--cluster-domain: cluster.local
addons:
- name: dns
- name: rbac
- name: metrics-server
And:
$ cat ./microk8s-token.yaml
---
version: 0.1.0
persistentClusterToken: 12345678901234567890123456789012
Do:
sudo snap install microk8s --classic
sudo microk8s status --wait-ready
sudo snap set microk8s config="$(cat microk8s-token.yaml)"
Apologies for the inconvenience.
Hi @ktsakalozos
No problem, thanks for the quick workaround :)
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.
Summary
Hello :)
I would like to setup a small MicroK8s cluster using the new "launch configurations" feature available since version 1.27. However, this doesn't work well when I want to automate the deployment using a config file delivered by Ansible before installing the snap.
Some informations about my setup :
1.27/stable
Here is my config file :
Here is the error message I got :
It's working fine without the
persistentClusterToken
directive, so I guess this is related with a missing "copy" in/var/snap/microk8s/5372/credentials/persistent-cluster-tokens.txt
file during the bootstrap.Reproduction Steps
/etc/microk8s.yaml
or/root/snap/microk8s/common/.microk8s.yaml
snap install microk8s --classic --channel=1.27/stable
Introspection Report
Can't provide it since the installation is failing
Thanks :)