Kubernetes Service Account Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
=Internal=
=Internal=
* [[Kubernetes Operations#Subjects|Kubernetes Operations]]
* [[Kubernetes Operations#Subjects|Kubernetes Operations]]
=Create a Service Account=
<syntaxhighlight lang='bash'>
kubectl create serviceaccount -n <namespace> <service-account-name>
kubectl create serviceaccount -n blue blue-serviceaccount
</syntaxhighlight>


=Details about the Namespace's Default Service Account=
=Details about the Namespace's Default Service Account=


  kubectl -n <''namespace'' -o yaml get sa default
  kubectl -n <''namespace'' -o yaml get sa default

Revision as of 05:22, 3 September 2020

Internal

Create a Service Account

kubectl create serviceaccount -n <namespace> <service-account-name>
kubectl create serviceaccount -n blue blue-serviceaccount

Details about the Namespace's Default Service Account

kubectl -n <namespace -o yaml get sa default