Score:0

Get resources across all namespaces by name - clusterrole vs all other resources

ng flag

May be the wrong forum for such a question, but I am wondering why:

k get daemonsets.apps sysdig-agent -A

returns:

error: a resource cannot be retrieved by name across all namespaces

while

k get clusterrole sysdig-agent -A

returns:

NAME           CREATED AT
sysdig-agent   2019-05-28T08:04:01Z

I actually didn't think you could search by name across all namespaces with any object type - I am surprised it works for clusterrole, wondering what the reason is behind this?

Thanks.

Score:0
in flag

It's because ClusterRole does not have a namespace, and thus the server just silently discarded your -A query for that resource type

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.