JavaScript required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Skip to content
Gallery
DevOps
Kubernetes (K8s)
Docker
HELM
Ansible
Linux Commands
More
Share
Explore
Role based access control (RBACs) in k8s
Service Account
Service+Accounts+in+Kubernetes+Cluster.
pdf
376.6 kB
If any pod has to access k8s api then a service account need to be created.
Creating a Service Account
apiVersion: v1
kind: ServiceAccount
metadata:
name: my-serviceaccount
namespace: development
automountServiceAccountToken: false
Assigning the service account using rolebinding
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: sa-pod-reader
namespace: development
subjects:
- kind: ServiceAccount
name: my-serviceaccount
namespace: development
roleRef:
kind: Role
name: pod-reader
apiGroup: rbac.authorization.k8s.io
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
Ctrl
P
) instead.