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 flag warnings in config.yaml #6756

Closed
reefland opened this issue Jan 14, 2023 · 2 comments
Closed

Unknown flag warnings in config.yaml #6756

reefland opened this issue Jan 14, 2023 · 2 comments

Comments

@reefland
Copy link

Environmental Info:
K3s Version:

$ k3s -v
k3s version v1.25.4+k3s1 (0dc63334)
go version go1.19.3

Node(s) CPU architecture, OS, and Version:
all nodes Ubuntu 22.04 bare metal.

$ uname -a
Linux k3s01 5.15.0-57-generic #63-Ubuntu SMP Thu Nov 24 13:43:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Cluster Configuration:

$ sudo kubectl get nodes
NAME    STATUS   ROLES                       AGE    VERSION
k3s01   Ready    control-plane,etcd,master   288d   v1.25.4+k3s1
k3s02   Ready    control-plane,etcd,master   262d   v1.25.4+k3s1
k3s03   Ready    control-plane,etcd,master   269d   v1.25.4+k3s1
k3s04   Ready    worker                      35d    v1.25.4+k3s1
k3s05   Ready    worker                      35d    v1.25.4+k3s1

Describe the bug:
Warning messaged about unknown flags within config.yaml such as:

$ sudo k3s etcd-snapshot ls

WARN[0000] Unknown flag --etcd-expose-metrics found in config.yaml, skipping 
WARN[0000] Unknown flag --kube-controller-manager-arg found in config.yaml, skipping 
WARN[0000] Unknown flag --kube-proxy-arg found in config.yaml, skipping 
WARN[0000] Unknown flag --kube-scheduler-arg found in config.yaml, skipping 
...

Trying to resolve the warning message. These entries were added a while back for Prometheus installation, which is working fine. The documentation on using the config.yaml is pretty-thin, but based on https://docs.k3s.io/installation/configuration#configuration-file what I have below appears to be formatted correctly.

$ cat /etc/rancher/k3s/config.yaml
---
etcd-expose-metrics: true
kube-controller-manager-arg:
  - "bind-address=0.0.0.0"
kube-proxy-arg:
  - "metrics-bind-address=0.0.0.0"
kube-scheduler-arg:
  - "bind-address=0.0.0.0"

Based on https://docs.k3s.io/reference/server-config these are valid flags.

I don't have an issue of something not working (that I'm aware of) just trying to understand the reason for the warning messages.

@brandond
Copy link
Member

brandond commented Jan 14, 2023

The config file contents are converted to CLI flags, some of which are not valid for the command you're currently running. It's just warning you about that.

This is just an artifact of how we've implemented config file support, nothing you're doing wrong.

@reefland
Copy link
Author

Thank you! Appreciate the prompt response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants