Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

unknown field "user" in config metadata #894

Open
vasyakrg opened this issue Jan 18, 2025 · 3 comments
Open

unknown field "user" in config metadata #894

vasyakrg opened this issue Jan 18, 2025 · 3 comments
Labels

Comments

@vasyakrg
Copy link

vasyakrg commented Jan 18, 2025

my config (see second metadata):

apiVersion: k0smotron.io/v1beta1
kind: Cluster
metadata:
  name: dev1
  namespace: dev1
spec:
  replicas: 1
  version: v1.31.3
  service:
      type: NodePort
      apiPort: 30443
      konnectivityPort: 30132
  k0sConfig:
    apiVersion: k0s.k0sproject.io/v1beta1
    kind: ClusterConfig
    metadata:
      name: dev1
      user: dev1-admin
    spec:
      api:
...

but, in dev1-0 pod i have error:
Error: failed to load node config: error unmarshaling JSON: while decoding JSON: json: unknown field "user"

if i del user: dev1-admin, i have kubeconfig:

  name: k0s
contexts:
- context:
    cluster: k0s
    user: admin
  name: k0s
current-context: k0s
kind: Config
preferences: {}
users:
- name: admin

why k0s and user: admin ?

@makhov
Copy link
Contributor

makhov commented Jan 20, 2025

k0smotron creates Kubernetes clusters based on k0s distribution

k0sConfig field is used for k0s config, not for kubeconfig, and doesn't support metadata.user field.

@vasyakrg
Copy link
Author

So there is no way I can get this data into it?
Because I can transfer this data when I create the base cluster:

apiVersion: k0sctl.k0sproject.io/v1beta1
kind: Cluster
metadata:
  name: k0s-infra
  user: infra-admin
spec:
  k0s:
    version: v1.31.3+k0s.0
    dynamicConfig: false
    config:
      spec:

Copy link

The issue is marked as stale since no activity has been recorded in 30 days

@github-actions github-actions bot added the Stale label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants