方式1
调用serviceAccount的createToken方法
方式2
创建secret,添加注解kubernetes.io/service-account.name:关联serviceAccount,如
apiVersion: v1
kind: Secret
metadata:
name: demo
namespace: default
annotations:
kubernetes.io/service-account.name: "sa-name"
type: kubernetes.io/service-account-token
网友评论