# ServiceAccount

## 实践

创建一个 ServiceAccount 资源

```
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ template "fullname" . }}
  labels:
    app: {{ template "fullname" . }}
    chart: {{ template "xdb.chart" . }}
    release: {{ .Release.Name | quote }}
    heritage: {{ .Release.Service | quote }}
{{- end -}}
```

## 传送门

[https://kubernetes.feisky.xyz/concepts/objects/serviceaccount](https://kubernetes.feisky.xyz/concepts/objects/serviceaccount)
