Command “config” is deprecated, use ‘k0s config validate’ instead ERRO[2023-02-19 05:48:09] failed to read config from file: failed to parse config from “/run/k0s/k0s.yaml”: error unmarshaling JSON: while decoding JSON: json: unknown field “apix”
When I run:
k0s config validate -d -c k0s.yaml
I get:
DEBU[2023-02-19 05:52:02] Starting debug server debug_server=“:6060” ERRO[2023-02-19 05:52:02] failed to read config from file: failed to parse config from “/run/k0s/k0s.yaml”: error unmarshaling JSON: while decoding JSON: json: unknown field “apix”
What’s the correct way to validate a config file? I have a config file that is supposed to start traefik but the pod is not loading what’s the best way to debug why not?
These are warnings related to missing kernel modules. As the names imply, all are related to networking (NAT).
Since WSL is a single node setup where all the networking is local anyways, I would lean into saying these should not cause any issues. Not having a personal WSL env to play with, I can’t say for sure though. But I do know people have used k0s in WSL envs succesfully.
For the config related issue, mind to share the entire config file you are using? The error kinda seems like some malformed yaml structures, but can’t be sure without seeing it.
It does not look like lens will let me upload or attach a yaml file what’s the best approach on lens. I was trying to run the config validation tool but as noted above it did not do what I expected, what’s the best way to run validation before install and how to see reported configuration errors after install? vscode did not see any issues with the file.
Flags:
-c, --config string config file, use ‘-’ to read the config from stdin (default “/etc/k0s/k0s.yaml”)
–data-dir string Data Directory for k0s (default: /var/lib/k0s). DO NOT CHANGE for an existing setup, things will break!
-d, --debug Debug logging (default: false)
–debugListenOn string Http listenOn for Debug pprof handler (default “:6060”)
-h, --help help for validate
–status-socket string Full file path to the socket file. (default “/var/lib/k0s/run/status.sock”)
-v, --verbose Verbose logging (default: false)
However, running with debug
k0s config validate -v -d --config k0s.yaml
DEBU[2023-02-21 07:33:42] runtime config found: using /run/k0s/k0s.yaml
DEBU[2023-02-21 07:33:42] Starting debug server debug_server=“:6060”
DEBU[2023-02-21 07:33:42] runtime config found: using /run/k0s/k0s.yaml
It seems like it’s not looking at my config file, some increased verbosity in the output would make it clearer what file its processing and whether there are any errors in the file. Running with -v but not -d it does not generate any output and its not clear what file its processing or whether there are any errors