Skip to main content
Support
0
Contact us
Nederlands
Deutsch
Español
Dedicated serversFlexible VPSCloud TechnologyColocationChallenges in ITSectorsCareers
Cloud Compute

With Cloud Compute, you have access anytime and anywhere to a portal through which you can configure your entire IT environment from wherever you are in the world.

Cloud Storage

Reliable access to your files, infrastructure, and applications at all times – with no interruptions or delays. At Worldstream, we offer a variety of storage solutions.

Flexible cloud icon
Flexible cloud
Private cloud icon
Private cloud
Bare metal icon
Bare Metal Compute
Hollow cube icon
Object storage
Hollow cube icon
File storage
Block storage icon
Block storage
Backup storage icon
Backup storage
Need support?

With experienced engineers and an average response time track record on 7 minutes, you can expect a solid technical support solution in next to no time.

All Servers

Choose your Dedicated Server now. Custom or Instant Delivery. Powerhouse servers built for your use case.

Use Cases

Whatever your use case, we’re here to help you find the ideal solution.

Deal servers icon
Deals
AMD servers icon
AMD Processors
AI servers icon
Intel Processors
Hollow cube icon
Virtualisation, Containerisation and Orchestration
Hollow cube icon
Websites and Applications
Hollow cube icon
Gaming and Streaming Infrastructure

24/7/365 support with an average response time of just 7 minutes. Thanks to our own data centers, our engineers can go directly to your server for fast, hands-on assistance. Email or call us anytime.

Smart outsourcing

Some IT creates added value, while other types are supportive. Use that as a starting point for outsourcing.

Cost Efficiency

Complete IT packages may seem like the safe option, but when you consider the costs, other choices often make more sense.

IT flexibility & control

Outsourcing doesn’t mean losing control; it actually provides more flexibility and control.

Cloud repatriation

The cloud is not a final destination: You should continuously evaluate and adjust your cloud environment as needs evolve.

Financial services
Logistics & Transportation
Retail & E-commerce
Media & Entertainment
Tech & Software Development
Security
Managed Service Providers
Need support?

With experienced engineers and an average response time track record on 7 minutes, you can expect a solid technical support solution in next to no time.

Chat with usContact us
About WorldstreamAbout the technologyCasesKnowledge base
About usMeet the teamJobsBecome a resellerCertificationsOur data centersOur networkDDoS ProtectionAMD EPYC serversTechnology PartnersOperating SystemsAll casesEasyTerraDutch Drone CompanyPerfGridArticlesFAQNews and BlogsProducts and Services
Contact us

Call +31 (0) 174 – 712 117

Industriestraat 53, Naaldwijk

Nederlands
Deutsch
Español
0
Dedicated serversFlexible VPSCloud TechnologyColocationChallenges in ITSectorsCareersAbout WorldstreamAbout the technologyCasesKnowledge baseMy Worldstream
Contact
Support
NederlandsDeutschEspañol
  1. HomeHome
  2. Knowledge Base
  3. Containers & Kubernetes
  4. Kubernetes RBAC basics: users, roles and service accounts

Kubernetes RBAC basics: users, roles and service accounts

Applies to Any self-managed Kubernetes clusterAudience Platform engineerLast reviewed September 2026

Quick answer

Kubernetes RBAC (role-based access control) grants permissions by binding a Role or ClusterRole, which lists allowed actions on resources, to a user, group, or service account through a RoleBinding or ClusterRoleBinding. Roles are namespace-scoped, ClusterRoles apply cluster-wide. Start from least privilege: grant only the verbs and resources a person or workload actually needs, in the narrowest scope that works.

On this page
  • What RBAC controls
  • Roles vs. ClusterRoles
  • RoleBindings vs. ClusterRoleBindings
  • Example: a read-only, namespace-scoped role
  • kubeconfig and service accounts
  • Principle of least privilege

This is standard, open-source Kubernetes behaviour, not specific to any provider or infrastructure choice. It applies equally whether your cluster runs on Bare Metal Compute, Flexible VPS, or Private Cloud, or anywhere else.

What RBAC controls

RBAC decides who, or what, can do what, to which resources, in your cluster. "Who" can be a human user authenticating through a kubeconfig, or a workload authenticating as a service account. "What" is a set of verbs: get, list, watch, create, update, patch, delete, and a few others. "Which resources" means Kubernetes objects: pods, deployments, secrets, config maps, and so on, optionally scoped to a specific namespace.

Without RBAC configured deliberately, it's easy to end up with everyone, and every workload, holding far more access than they need. RBAC exists to make access explicit and auditable rather than implicit.

Roles vs. ClusterRoles

  • Role. A set of permissions scoped to a single namespace. A Role defined in the billing namespace only grants access to resources in billing, nowhere else.
  • ClusterRole. The same idea, but cluster-wide. A ClusterRole can grant access across all namespaces, or to cluster-scoped resources that don't belong to any namespace at all, such as nodes or persistent volumes.

A useful rule of thumb: default to a Role unless you have a specific reason to need cluster-wide scope. Namespace-scoped access is easier to reason about and limits the blast radius if a credential leaks.

RoleBindings vs. ClusterRoleBindings

Defining a Role or ClusterRole doesn't grant anyone anything on its own, it just describes a set of permissions. A binding is what actually attaches that role to a user, group, or service account.

  • RoleBinding. Grants a Role (or, notably, a ClusterRole) to a subject within one namespace. You can bind a ClusterRole through a RoleBinding to reuse a common permission set namespace by namespace, without granting cluster-wide access.
  • ClusterRoleBinding. Grants a ClusterRole to a subject across the entire cluster.

Example: a read-only, namespace-scoped role

The manifest below defines a Role that can only read pods and their logs in the billing namespace, then binds it to a service account.

apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  namespace: billing
  name: pod-reader
rules:
  - apiGroups: [""]
    resources: ["pods", "pods/log"]
    verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: read-pods
  namespace: billing
subjects:
  - kind: ServiceAccount
    name: billing-readonly
    namespace: billing
roleRef:
  kind: Role
  name: pod-reader
  apiGroup: rbac.authorization.k8s.io

This grants exactly three verbs, on two resource types, in one namespace, nothing more. It's a reasonable pattern for a monitoring tool, a support engineer, or a CI job that only needs to inspect pod state and logs.

kubeconfig and service accounts

Human users typically authenticate through a kubeconfig file, which points kubectl at a cluster and carries credentials, a certificate, a token, or an external identity-provider login, depending on how the cluster is set up. Each user or team usually gets their own kubeconfig context, scoped through RBAC to only the namespaces and permissions they need.

Workloads running inside the cluster use service accounts instead. Every namespace has a default service account, but running everything under the default is a common way to end up with broader access than intended. Create a dedicated service account per workload, bind it to a purpose-built Role, and mount only that identity into the pod that needs it.

Principle of least privilege

The pattern that keeps RBAC manageable as a cluster grows: grant the smallest set of verbs, on the smallest set of resources, in the smallest scope, that lets a user or workload do its job. Prefer Roles over ClusterRoles, prefer read-only verbs (get, list, watch) over write access unless write access is genuinely needed, and give each workload its own service account rather than sharing one broadly-scoped identity across many pods. Review bindings periodically, since access that made sense when it was granted doesn't always stay that way.

Related articles

  • Self-managed Kubernetes on Worldstream: choosing your infrastructure
  • Handling stateful services in containers
  • Do containers replace VMs? Choosing the right isolation model
Was this article helpful?

Solid IT. No Surprises

Sparring partner for IT maturity
Eliminating barriers so you can run
Predictable and transparant costs

Contact

  • Industriestraat 53, Naaldwijk
  • Payment Methods
  • Abuse
  • Developers Resources
  • Network Operations Center
  • About us
  • Meet the team
  • Jobs
  • Become a reseller
  • Certifications
  • Our data centers
  • Our network
  • DDoS Protection
  • AMD EPYC servers
  • Technology Partners
  • Operating Systems
  • Overview
  • FAQ
  • Cases
  • News & Blogs
  • Use Cases
Nederlands
Deutsch
Español
Nederlands
Deutsch
Español
  • Legal
  • Disclosure