snippetkubernetesMinor
Kubernetes - How to show all service accounts
Viewed 0 times
showallkubernetesservicehowaccounts
Problem
How do I show all service accounts In Kubernetes?
I have tried
How can I use
I have tried
kubectl get --all-namespaces all. It does not show service accounts.How can I use
kubectl to list all service accounts?Solution
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.
Example:
kubectl get pods,svc,sa,deployments [-FLAGS]
The FLAGS would apply to all the resources.
This will only provide the service accounts.
In general, you can have a comma separated list of resources to display.
Example:
kubectl get pods,svc,sa,deployments [-FLAGS]
The FLAGS would apply to all the resources.
Context
StackExchange DevOps Q#9025, answer score: 9
Revisions (0)
No revisions yet.