rancher / k3os

Purpose-built OS for Kubernetes, fully managed by Kubernetes.
https://k3os.io
Apache License 2.0
3.5k stars 396 forks source link

Token not created on install, only some config options picked up on install #840

Open heytcass opened 2 years ago

heytcass commented 2 years ago

Version (k3OS / kernel)

v0.21.5-k3s2r1

Architecture

Proxmox x86_64 host QEMU VM with 2 CPUs, 4 Gb of RAM, UEFI

Describe the bug

Run the installer off of the k3OS ISO, with this config file:

---
ssh_authorized_keys:
- "ssh-rsa <key>"
- "github:heytcass"
hostname: k30s-01
write_files:
- path: /var/lib/conman/default.config
  content: |-
    [service_eth0]
    Type=ethernet
    IPv4=192.168.25.14/255.255.255.0/192.168.25.1
    IPv6=off
    Nameservers=192.168.53.3
k3os:
  password: <redacted>
  ntp_servers:
  - 0.us.pool.ntp.org
  - 1.us.pool.ntp.org
  dns_nameservers:
  - 8.8.8.8
  - 1.1.1.1
  k3s_args:
  - server
  - --datastore-endpoint=mysql://rancher:<redacted>@tcp(192.168.25.12:3306)/k3s
  - --tls-san=<redacted>
  - --node-external-ip=192.168.25.14
  labels:
    k3os.io/upgrade: latest

After completing the installation, it says everything went well and reboots, and after the reboot, settings like the hostname, authorized keys, and password are picked up. However the static IP isn't honored, no new tables show up in my datastore, and most interestingly, no token can be found at /var/lib/rancher/k3s/server, only the cred, manifests, and tls directories are in that folder.

To Reproduce

Boot from k3OS iso, select install option, provide cloud-init file, finish installation. Log into shell after boot, cat /var/lib/rancher/k3s/server/node-token. No such file or directory.

Expected behavior

Expect a token to be found at /var/lib/rancher/k3s/server/node-token to be used to join other nodes to the cluster.

Actual behavior

No token is found, and some settings from the config file don't seem to be picked up.

Additional context