https://rancher.com/ logo
Title
c

curved-caravan-26314

06/23/2022, 6:25 PM
Hi all, I was reading about some updates and I just wanted to confirm what I think I understand. I can install k3os from iso onto baremetal. I am prompted during the process including making a token if i want. Then, i can go to another baremetal machine and make it an agent and type in the token, ip address and it will work? I dont have to call up a github url if i dont want to during the install?
h

high-waitress-66594

06/27/2022, 10:33 PM
this sounds correct to me
c

curved-caravan-26314

06/27/2022, 10:44 PM
How can I ssh remotely to a k3os instance?
h

high-waitress-66594

06/27/2022, 10:53 PM
have a valid public key in the
ssh_authorized_keys: []
array and/or set a password via
k3os.password
(yaml
k3os: {password: "", ...}
c

curved-caravan-26314

06/27/2022, 10:54 PM
so it would be easier to set a password at the command line
h

high-waitress-66594

06/27/2022, 10:54 PM
if you didnt do that when you provisioned it, you can hit
e
in the grub menu and add
k3os.password=mypassword
on the kernel command line as a one-time override (the password will be forgotten next boot, so update your config)
"easier" is up to you to decide. long term, i think supplying ssh public keys in the config is more secure.
c

curved-caravan-26314

06/27/2022, 10:56 PM
how do i get to supply public ssh keys. these machines are physical, not virtual
h

high-waitress-66594

06/27/2022, 10:57 PM
how are you getting the config to them?
config.yaml
i mean?
c

curved-caravan-26314

06/27/2022, 10:57 PM
thats why im posting here for help!
all i know is what i saw when i went to do a installation to a physical machine and filling in all the blanks
h

high-waitress-66594

06/27/2022, 11:00 PM
i see. well, what i tend to do with homelab boxes is: • boot to "live" mode via installation media while supplying a
k3os.password
value on the kernel command-line •
ssh rancher@<host>
using said password to verify connectivity • copy over the
config.yaml
via the ssh connectivity. for me this is usually
scp
assuming you lack such access, you can also have your
config,yaml
on a usb drive to mount and manually copy onto the system to be used during installation
otherwise you'll want to host it on the local network somewhere
c

curved-caravan-26314

06/27/2022, 11:02 PM
can i also set a file to bring in via github??
h

high-waitress-66594

06/27/2022, 11:02 PM
i don't believe so. the config.yaml is a one-shot at install time iirc
the k3os installer accepts config destined for
/k3os/system/config.yaml
(on a booted system) but this can be edited and/or supplemented after the install completes but prior to reboot if you know where to look. see https://github.com/rancher/k3os#configuration, specifically the latter two items in that list
the trick is, on the device that you've installed k3os on, you will need to mount it and create the location and add the config to be merged, knowing that all persistent data on the K3OS_DATA device lives under
/k3os/data
, i.e. •
sudo mkdir -vp /mnt
sudo mount /dev/sda1 /mnt
sudo mkdir -vp /mnt/k3os/data/var/lib/rancher/k3os/config.d
sudo cp my-custom-config.yaml /mnt/k3os/data/var/lib/rancher/k3os/config.d/