Open pizzapim opened 11 months ago
Thanks for reporting, @pizzapim!
This error is because executing the kubenix
package through nix run
attempts to apply resources to a target cluster while something like nix build
will only evaluate the output to ./result
without touching any target cluster. So the former needs kubernetes.kubeconfig
while the latter does not.
I do think we could throw a better error message though (and probably update the README.md
CLI section to show more than a vague import ./cluster
) so I'll leave this open to at least track that.
Thanks for the reply, that makes total sense. Mentioning the kubeconfig option in the README would be useful for new users.
I got the same error in the beginning as well. @hall many other tools rely on kubectl being "already configured" so maybe it makes sense to have $HOME/.kube/config
as the default for kubernetes.kubeconfig
option?
Hey @zarelit! I agree that'd be a sensible default. I've started a PR to do just that.
just got bitten by it as well trying to help with another issues :)
Hi, I wanted to try Kubenix, but I couldn't get the example to work. I have the following flake taken from the examples:
Then I use
nix run .#kubenix
, which produces: