23 lines
819 B
Markdown
23 lines
819 B
Markdown
---
|
||
title: "Kubernetes Service Account"
|
||
type: concept
|
||
tags: [Kubernetes, Security, Authentication]
|
||
last_updated: 2026-04-19
|
||
---
|
||
|
||
## 定义
|
||
Kubernetes Service Account(服务账户)是 Pod 用于身份验证到 Kubernetes API Server 的机制。每个 Pod 关联一个服务账户,默认使用 default 服务账户。
|
||
|
||
## 安全最佳实践
|
||
- 禁用自动挂载(`automountServiceAccountToken: false`)
|
||
- 使用私有服务账户而非默认账户
|
||
- 通过 Role/RoleBinding 最小化权限
|
||
- 定期轮换服务账户凭据
|
||
|
||
## 关联安全配置
|
||
- `automountServiceAccountToken`:控制是否自动挂载服务账户令牌
|
||
- `imagePullSecrets`:用于私有镜像仓库认证
|
||
|
||
## 相关资源
|
||
- 来源:[[CTP Topic 49 Container Lifecycle Hardening Standards]]
|
||
- 相关概念:[[Container-Lifecycle-Hardening]] |