Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
How do I show all service accounts In Kubernetes?
I have tried kubectl get --all-namespaces all. It does not show service accounts.
kubectl get --all-namespaces all
How can I use kubectl to list all service accounts?
The command you listed will show you your resources.
Instead try: kubectl get serviceAccounts
kubectl get serviceAccounts
kubectl get sa --all-namespaces
This will only provide the service accounts.
In general, you can have a comma separated list of resources to display.
kubectl get pods,svc,sa,deployments [-FLAGS]
The FLAGS would apply to all the resources.
Required, but never shown