typora/note/K8S/实战笔记/1.27之后创建sa没有创建token.md
2024-12-12 10:48:55 +08:00

303 B

1.创建sa

  • 不会自动创建secret
kubectl create sa sa-demo

2.创建secret

apiVersion: v1
kind: Secret
metadata:
  name: secret-sa-demo
  namespace: default
  annotations:
    kubernetes.io/service-account.name: sa-demo
type: kubernetes.io/service-account-token