How to Configure MicroK8s Multi Tenant
You set up a microk8s multi tenant cluster by creating namespaces and strict role rules. Then you add resource limits and network rules to keep teams apart. Many teams start by sharing one admin key across every user on the cluster. That shortcut gives every developer full control over all apps and shared data. One bad command in one namespace can break the whole node for everyone. How a microk8s multi tenant setup works A lightweight cluster runs all core services on one machine or a small g
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
You set up a microk8s multi tenant cluster by creating namespaces and strict role rules. Then you add resource limits and network rules to keep teams apart. Many teams start by sharing one admin key across every user on the cluster. That shortcut gives every developer full control over all apps and shared data. One bad command in one namespace can break the whole node for everyone.
How a microk8s multi tenant setup works
A lightweight cluster runs all core services on one machine or a small group. To share this cluster across teams, you divide it into separate logical spaces. Each team gets its own namespace to run apps and store secret keys. Namespaces give each group a clear boundary for their daily work.
Next, you set up role rules for each namespace on the cluster. A role lists what actions a user can take on pods and services. You bind each team member to a role inside their own namespace. They cannot read or change pods in another team space.
You also need resource quotas to keep one team from taking all memory. Quotas set a hard cap on CPU and memory for each namespace. Every pod must ask for a set amount of CPU and RAM before running. If a team hits their cap, the cluster blocks new pods in that space.
Isolating network traffic and node resources
By default, pods in different namespaces can talk to each other over the network. You must turn on a network add-on to block traffic between teams. Network rules drop all packets coming from outside a team namespace. Only approved services can send data across namespace lines.
Storage also needs careful separation on a shared cluster. Teams should not mount host folders directly from the underlying server disk. If a pod mounts the host disk, it can read files from other teams. Admin rules must block host disk mounts and force safe storage claims.
You should also restrict pods from running as the root user on nodes. Pod security rules stop users from starting containers with high system rights. This keeps a broken app trapped inside its own container space.
Multi-Factor Authentication (MFA) + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
What native controls solve and what they miss
Namespaces, roles, and quotas do a good job of splitting up cluster resources. They decide who can log in and which namespace they can reach. They also stop one loud app from starving other apps of CPU power.
Still, native cluster roles only check permissions when a session starts or calls an API. Once a user has shell rights to a pod, the cluster stops watching. The native role does not inspect what commands the user runs inside that pod. It also cannot rewrite sensitive fields like emails or card numbers in output.
Teams often share static config files to log in to the cluster API. These files sit on laptops and stay valid for a very long time. Auditing who ran which exact shell command inside a pod remains very hard. Standard cluster logs show that a session opened, not what happened inside it.
Add request guardrails and response masking beside Kubernetes
Cluster roles and service accounts govern who reaches the Kubernetes API. Still, a broad role or agent can delete workloads or print sensitive values from ConfigMaps and logs. In practice, hoop.dev sits inline beside the API server as a sidecar for your Kubernetes API. For every production API call an agent or human sends, hoop.dev decides whether to pass, mask, block, or escalate it for review alongside RBAC.
With hoop.dev Kubernetes controls, guardrails allow listing Secret names while refusing reads of Secret data before execution, and data masking redacts matched keys in returned JSON responses and log streams in memory. Furthermore, hoop.dev holds SOC 2 Type II and is MIT licensed on GitHub.
Frequently asked questions
Can namespaces alone isolate teams on a shared cluster?
No, namespaces only group names and objects together. You must add role rules, network rules, and quotas to separate teams.
How do you stop one team from using all node memory?
You place a resource quota object inside each team namespace. This sets a strict limit on total CPU and memory for that team.
Why are static cluster config files risky for shared teams?
Static files hold long-lived keys that are easy to copy or leak. If someone steals the file, they gain full role rights until you rotate keys.
Related guides
In this post