typora/note/K8S/实战笔记/1.27之后创建sa没有创建token.md

22 lines
303 B
Markdown
Raw Permalink Normal View History

2024-12-11 21:48:55 -05:00
### 1.创建sa
- 不会自动创建secret
```bash
kubectl create sa sa-demo
```
### 2.创建secret
```yaml
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
```