Skip to content

Latest commit

 

History

History
36 lines (21 loc) · 534 Bytes

File metadata and controls

36 lines (21 loc) · 534 Bytes

Service account list

kubectl get sa

When a namespace is created, a service account is created automatically

kubectl create namespace jupiter
kubectl get sa -n jupiter

Verify SA Token Mount in Pods

kubectl run nginx-pod --image=nginx
kubectl exec -it nginx-pod -- bash
cd /run/secrets/kubernetes.io/serviceaccount
cat token

Create a pod with a custom service account

kubectl create sa test-sa
kubectl run custom-sa-pod --image=nginx --serviceaccount="test-sa"