service acount = sa
创建sa,会自动创建一个token。
root@myang-computer:~/yaml# kubectl create sa mysa
serviceaccount/mysa created
root@myang-computer:~/yaml# kubectl get sa
NAME SECRETS AGE
default 1 2d4h
mysa 1 14s
root@myang-computer:~/yaml# kubectl describe sa mysa
Name: mysa
Namespace: default
Labels: <none>
Annotations: <none>
Image pull secrets: <none>
Mountable secrets: mysa-token-ndzzj
Tokens: mysa-token-ndzzj
Events: <none>
root@myang-computer:~/yaml# kubectl get secret
NAME TYPE DATA AGE
default-token-98vk6 kubernetes.io/service-account-token 3 2d4h
mysa-token-ndzzj kubernetes.io/service-account-token 3 58s 《------ 创建mysa 自动创建的token
标签:kubectl,yaml,token,computer,sa,k8s,mysa From: https://www.cnblogs.com/xiangyu5945/p/17376097.html