Kubernetes - Service Accounts đ
Description đ
When a pod
is created it automatically links it to a service account
.
Basic Commands
đ
-
create a new service account
kubectl create serviceaccount <account-name>
Examples đ§Š
-
sample
service account
definitionapiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: read-pods namespace: default subjects: - kind: ServiceAccount name: dashboard-sa # Name is case sensitive namespace: default roleRef: kind: Role #this must be Role or ClusterRole name: pod-reader # this must match the name of the Role or ClusterRole you wish to bind to apiGroup: rbac.authorization.k8s.io