-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Results of kubectl commands not sorted #2409
Comments
It you want things sorted by a field, you have to ask for it; I don't believe it's documented as sorted any specific way otherwise. This might be due to kine not sorting the keys in the same way that etcd does, but I don't think that's guaranteed anywhere. https://medium.com/faun/sorting-output-in-kubernetes-aa4db6894629 |
Closing as this is expected behavior |
I don't think it is fair to say this is expected behaviour when almost all other K8s flavours at least returns |
While it might be common to distros that use etcd, it is an implementation detail and not required by any spec, as discussed above. If its a problem for you, use embedded etcd instead of kine. |
Environmental Info:
K3s Version:
1.18.10
Node(s) CPU architecture, OS, and Version:
ubuntu 20.04
Cluster Configuration:
2 masters, MySQL backend DB
Describe the bug:
When running kubectl commands, often the results are not sorted as expected.
Steps To Reproduce:
For example, get nodes should return results in alphabetical order. Ran twice and order is not consistent:
Getting all pods should sort by namespace, then pod name. Results are random:
Additional context / logs:
Appears to be an issue because k3s is not sorting results. Likely only an issue when backend is relational, since etcd probably returns results sorted by key name.
The text was updated successfully, but these errors were encountered: