Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Creating a single node cluster uses etcd instead of kine for storage #384

Closed
wvh opened this issue May 8, 2022 · 8 comments
Closed

Creating a single node cluster uses etcd instead of kine for storage #384

wvh opened this issue May 8, 2022 · 8 comments

Comments

@wvh
Copy link

wvh commented May 8, 2022

When creating a single node cluster using k0sctl, the created cluster will use etcd for storage instead of kine, unless the storage option is specifically set to kine.

Explicitly adding a storage stanza will correctly use kine. Extract from k0sctl.yaml:

...
spec:
  hosts:
  - ssh:
      address: 1.2.3.4
      user: user
      port: 22
    role: single
  k0s:
    version: 1.23.6+k0s.0
    dynamicConfig: false
    config:
      apiVersion: k0s.k0sproject.io/v1beta1
      kind: Cluster
      metadata:
        name: monitoring
      spec:
        podSecurityPolicy:
          defaultPolicy: 00-k0s-privileged
        storage:
          type: kine
        ...

Without storage section, k0s will use etcd, even though the documentation says kine is the default storage option for single node clusters. I don't know if this is a bug with propagation of default values or simply a documentation issue.

$ k0sctl version
version: v0.13.0-rc.2
commit: 39a3f13
@kke
Copy link
Contributor

kke commented May 9, 2022

That's strange. The only thing k0sctl should be doing when using single role is to add --single to k0s install flags.

@kke
Copy link
Contributor

kke commented May 9, 2022

k0s config create creates a config with storage.type: etcd, but k0sctl should only do that when there's no spec.k0s.config at all.

@kke
Copy link
Contributor

kke commented May 9, 2022

This may actually be a problem in k0s, if you provide a partial config to a cluster with --single, it will pick up etcd.

k0sproject/k0s#1707 related.

@till
Copy link

till commented Oct 8, 2023

@kke I just tried this, when I run with single, it'll still start etcd. When I set storage.type: kine (no storage.kine.datasource), it will start with sqlite.

@twz123
Copy link
Member

twz123 commented Nov 25, 2024

Is that still an issue? I cannot repro this using k0sctl 0.19.4 and k0s 1.31.2.

@till
Copy link

till commented Nov 25, 2024

What exactly did you confirm?

@twz123
Copy link
Member

twz123 commented Nov 25, 2024

What exactly did you confirm?

That running a node with role: single and no other storage settings via k0sctl uses kine by default.

@kke
Copy link
Contributor

kke commented Jan 22, 2025

This should be fixed by #816

@kke kke closed this as completed Jan 22, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants