Kubernetes - k8s readonly AUTH
2024-07-31
apiVersion: v1
kind: ServiceAccount
metadata:
name: readonly-all
namespace: default
secrets:
- name: readonly-all # 引用到 Secret 的名称
---
apiVersion: v1
kind: Secret
metadata:
name: readonly-all
namespace: default
annotations:
kubernetes.io/service-account.name: "readonly-all"
type: kubernetes.io/service-account-token
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: readonly-all
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: view
subjects:
- kind: ServiceAccount
name: readonly-all
namespace: default
标题:Kubernetes - k8s readonly AUTH
地址:https://blog.njqhome.com:8443/articles/2024/07/30/1722327179644.html