kubernetes: kubectl should provide better error message when validation failed
I found many users confused when they see this error message:
error validating data: <some error messages>; if you choose to ignore these errors, turn validation off with --validate=false
For most of them, the command just failed, and they don’t know how to move on.
We should provide better error message, and communicate better what they should do next.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 14
- Comments: 37 (8 by maintainers)
kubectl --namespace=default apply -f deployment/production/deployment.yaml
Don’t know if this is same issue but this is what i get when i do the following lol 😄
Not even a line number
Agree that this should give the line number / character offset. Also, I think the point has been made elsewhere, but would be great if
--validate
/--dry-run
caught these errors (for me, it doesn’t seem to).@wyardley: You can’t reopen an issue/PR unless you authored it or you are a collaborator.
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
/reopen
@fejta-bot: Closing this issue.
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
I got the same error as @gertcuykens for the very same reason (using
true
instead of"true"
in a container’s environment variable value. A better error message would go a long way here 😄