Can someone please help me for command to output all resources/services sorted . . .

Kalpan:
can someone please help me for command to output all resources/services sorted by namespace:
k get all --all-namespaces is command but default sort is pods, services, deamonset, deployment and replicaset.

Sharvirala:
kubectl get all -A

Kalpan:
i should ask my question differently. the k get all -A groups by resource, but not namespace(as you can see in image).
I would like the same but grouped by namespace.

Tej_Singh_Rana:
Add resource name and use -A. Ex:

kubectl get svc,pods,deploy -A

Kalpan:
thanks @Tej_Singh_Rana is is still not grouping by namespace

Mayur Sharma:
@Kalpan, please share the answer if you find it. Thanks !

Madhan Kumar:
there is no easy way for this that I know of , but it can be done using jsonpath . Check the snip , first one without sort by second one uses sort .