k0s icon indicating copy to clipboard operation
k0s copied to clipboard

Fedora CoreOS instructions.

Open dwarf-king-hreidmar opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe.

I switched over to running k0s on CoreOS from Ubuntu on my RPi cluster and there are some differences in the manual install. I'm also not sure if k0sctl supports CoreOS

Examples: installing libcgroup and libcgroup-tools using rpm-ostree kargs .. to set the necessary kernel arguments

Describe the solution you would like

Would it be helpful if I PR'd some notes about CoreOS to the docs or wrote a new doc?

Describe alternatives you've considered

k0sctl might just support the install on Fedora CoreOS or other ostree backed OS.

Additional context

No response

dwarf-king-hreidmar avatar Aug 21 '22 00:08 dwarf-king-hreidmar

FYI there's an open issue and PR for CoreOS support in k0sctl.

twz123 avatar Aug 22 '22 07:08 twz123

We can close this issue now. CoreOS support is baked in!

dwarf-king-hreidmar avatar Feb 24 '23 04:02 dwarf-king-hreidmar

@dwarf-king-hreidmar Could you expand on how CoreOS is baked in now? I'm trying to get it setup right, but when I restart the Fedora CoreOS servers, k0s is no longer installed. I have to run k0s install worker and then start it again. I have mounted /var to a second drive and set wipeTable: false in my Ignition files. It seems everything is still there under `/var/lib/k0s. I found a few hints here and there looking over some of the linked issues, but not sure what I'm missing. I appreciate any guidance! This is what my config file looks like.

apiVersion: k0sctl.k0sproject.io/v1beta1
kind: Cluster
metadata:
  name: k0s-cluster
spec:
  hosts:
  - ssh:
      address: 10.3.3.21
      user: core
      port: 22
      keyPath: ~/.ssh/.id_rsa
    role: controller
    installFlags:
      - "--profile coreos"
  - ssh:
      address: 10.3.3.22
      user: core
      port: 22
      keyPath: ~/.ssh/.id_rsa
    role: controller
    installFlags:
      - "--profile coreos"
  - ssh:
      address: 10.3.3.23
      user: core
      port: 22
      keyPath: ~/.ssh/.id_rsa
    role: controller
    installFlags:
      - "--profile coreos"
  - ssh:
      address: 10.3.3.24
      user: core
      port: 22
      keyPath: ~/.ssh/.id_rsa
    role: worker
    installFlags:
      - "--profile coreos"
  - ssh:
      address: 10.3.3.25
      user: core
      port: 22
      keyPath: ~/.ssh/.id_rsa
    role: worker
    installFlags:
      - "--profile coreos"
  - ssh:
      address: 10.3.3.26
      user: core
      port: 22
      keyPath: ~/.ssh/.id_rsa
    role: worker
    installFlags:
      - "--profile coreos"
  k0s:
    version: 1.27.4+k0s.0
    dynamicConfig: false
    config:
      spec:
        controllerManager:
          extraArgs:
            flex-volume-plugin-dir: "/etc/kubernetes/kubelet-plugins/volume/exec"
        workerProfiles:
          - name: coreos
            values:
              volumePluginDir: /etc/k0s/kubelet-plugins/volume/exec/
        network:
          provider: custom
          kubeProxy:
            disabled: true
        api:
          externalAddress: 10.3.3.20
          sans:
          - 10.3.3.20

andyrue avatar Aug 30 '23 20:08 andyrue

Support is baked in. As in, k0s will actually run on CoreOS where it wouldn't run before. There were missing dependencies. The service isn't installed by default. I use Ansible to deploy k0s instead of using k0sctl.

dwarf-king-hreidmar avatar Aug 30 '23 23:08 dwarf-king-hreidmar

Curios, what are you doing to install it as a service on CoreOS? After further testing, it seems to be surviving soft reboots, but if I power down the machine and start it up again, it is gone.

andyrue avatar Aug 31 '23 13:08 andyrue

I see exactly what's going on now. The service is being installed to /etc/k0s, and of course everything in /etc gets wiped on restart, but I guess not on soft reboot.

andyrue avatar Aug 31 '23 15:08 andyrue

Yes. I drop mine on a separate mount since fcos is immutable.

Sent from Proton Mail for iOS

On Thu, Aug 31, 2023 at 11:46 AM, Andrew @.***(mailto:On Thu, Aug 31, 2023 at 11:46 AM, Andrew < wrote:

I see exactly what's going on now. The service is being installed to /etc/k0s, and of course everything in /etc gets wiped on restart, but I guess not on soft reboot.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

dwarf-king-hreidmar avatar Aug 31 '23 15:08 dwarf-king-hreidmar