provider-azure
provider-azure copied to clipboard
Some resources not showing with kubectl get
What happened?
Created several resources (storage account, cosmosdb, resource group, key vault, and cache). All were created as expected, however when I try and get the resources with kubectl, for storage account and cosmosdb, they are not listed.
kubectl get account
No resources found
However keyvault and resourcegroup are fine (e.g.):
kubectl get vault
kubectl get resourcegroup
I'm a little confused about the type though, because both cosmosdb and storage account are both kind "Account". as is cognitive services, which I haven't created yet, not sure how kubectl get account distinguishes this.
Or if I am just doing something wrong?
How can we reproduce it?
- Create a storage account with crossplane
- Run kubectl get account after it has completed
What environment did it happen in?
Crossplane version: v0.21.0
Some further investigation, I am able to see the resources using the CRD name:
kubectl get accounts.storage.azure.upbound.io
I'm assuming this behavior has something to do with multiple CRDs having the same kind "Account" specified. I wouldn't think that kubectl get account should bring back unrelated items like CosmosDB, OpenAI, and Storage Account, especially when it doesn't indicate anything further about the type by default.
Also, if you try and usekubectl describe account <resource> it seems to just pick one of the multiple CRDS that use "Account" as the kind:
kubectl describe account XXXXXXX
Error from server (NotFound): accounts.cognitiveservices.azure.upbound.io "XXXXXX" not found
Are we supposed to always use the full name? I have a workaround (or maybe the intended use), so I'm able to move forward, but I'll leave this here in the event this is a bug.