/idp-skills:multi-tenancy-and-team-workspace-design-for-idpfrom idp-skills
Designs tenant/workspace isolation for shared internal developer platforms — namespace-per-team patterns, RBAC boundaries, quota enforcement, and shared-vs-dedicated infrastructure tradeoffs.
Ships in idp-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A shared internal developer platform only stays viable if teams sharing it can't see, break, or starve each other's resources by accident — the moment one team's misconfigured workload can exhaust a shared cluster's capacity, or one team's RBAC role can read another team's secrets, the platform stops being a trustworthy shared substrate and every team either demands a dedicated environment or starts treating the platform defensively. Multi-tenancy design is the discipline of drawing tenant boundaries — namespace-per-team, RBAC scoping, resource quotas, network policy — deliberately enough that "shared platform" doesn't quietly mean "soft-isolated at best," while stopping short of giving every team a fully dedicated cluster, which defeats the cost and operational-overhead benefits a shared platform exists to provide. This skill covers designing that isolation boundary: what to isolate at the namespace/RBAC layer, what genuinely needs dedicated infrastructure instead, and how catalog/ self-service permissions map onto the same tenant boundaries so a team's platform access matches its infrastructure access.
ResourceQuota, LimitRange,
NetworkPolicy, and RBAC (Role/RoleBinding) objects — these are the
concrete mechanisms this skill's guidance is built on.NetworkPolicy (not all do by default — Calico,
Cilium, and most managed Kubernetes CNIs support it; flannel's default
mode does not without an add-on) — confirm this before assuming
network-level tenant isolation is actually in effect.Choose the tenancy model deliberately: namespace-per-team (soft multi-tenancy) versus cluster-per-team (hard multi-tenancy), per workload class, not as a single org-wide default. Namespace-per-team is far cheaper to operate (one control plane, shared node pools) and sufficient for the large majority of internal workloads; reserve dedicated clusters for tenants with a genuine hard requirement — a regulatory boundary (e.g. a workload that must run in a physically or logically separate control plane for compliance), a distinct blast- radius requirement (a tenant whose outage must never be able to correlate with another's), or resource profiles so large/spiky that sharing a control plane creates real noisy-neighbor risk even with quotas in place.
# Tenancy decision, by workload class (illustrative)
- Standard internal services: namespace-per-team, shared cluster.
- PCI-scoped payment processing: dedicated cluster (compliance
boundary requires it, not just preference).
- ML training workloads with unpredictable GPU-node bursts: dedicated
node pool within the shared cluster (not a full separate cluster —
the isolation need is capacity/scheduling, not RBAC/network).
Create one namespace per team (or per team-environment pair) with a
consistent naming convention, provisioned through the platform's
self-service/scaffolding path rather than a manual kubectl create namespace, so every namespace's quota, RBAC, and network policy are
applied consistently from creation:
apiVersion: v1
kind: Namespace
metadata:
name: checkout-team-production
labels:
team: checkout-team
environment: production
Bind RBAC roles per namespace via groups, scoped to the minimum
verbs/resources a team actually needs, never a cluster-wide
ClusterRoleBinding granting a team broad access "to be safe":
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: checkout-team-production
name: team-workload-manager
rules:
- apiGroups: ["apps", ""]
resources: ["deployments", "services", "configmaps", "pods", "pods/log"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list"] # read own secrets, not create/delete via kubectl
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
namespace: checkout-team-production
name: checkout-team-binding
subjects:
- kind: Group
name: "checkout-team"
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: Role
name: team-workload-manager
apiGroup: rbac.authorization.k8s.io
Binding to the checkout-team group (sourced from the identity
provider) rather than individually listing users means team-membership
changes take effect through the IdP, not a platform-team ticket.
Enforce resource quotas and default limits per namespace so one team's workload can't exhaust shared node capacity and starve another tenant — the single most common "shared platform breaks trust" incident:
apiVersion: v1
kind: ResourceQuota
metadata:
name: checkout-team-quota
namespace: checkout-team-production
spec:
hard:
requests.cpu: "20"
requests.memory: 40Gi
limits.cpu: "40"
limits.memory: 80Gi
pods: "100"
---
apiVersion: v1
kind: LimitRange
metadata:
name: checkout-team-default-limits
namespace: checkout-team-production
spec:
limits:
- default:
cpu: "500m"
memory: 512Mi
defaultRequest:
cpu: "250m"
memory: 256Mi
type: Container
LimitRange matters as much as ResourceQuota — a quota alone doesn't
stop a single unbounded container from being scheduled and starving
everything else in the namespace before the quota is even reached at
the aggregate level.
Isolate east-west network traffic between tenants with
NetworkPolicy, defaulting to deny-all-ingress-from-other-namespaces
and explicitly allowing only what's needed (a shared ingress
controller, a shared observability agent scraping metrics):
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny-cross-namespace
namespace: checkout-team-production
spec:
podSelector: {}
policyTypes: ["Ingress"]
ingress:
- from:
- podSelector: {} # allow same-namespace traffic
- from:
- namespaceSelector:
matchLabels:
platform-shared: "true" # allow shared ingress/observability namespaces
Without this, RBAC isolation still leaves every pod in the cluster able to reach every other pod's network endpoints directly — RBAC and network policy are separate isolation layers, and skipping either leaves a real gap.
Scope secrets per namespace and per tenant in whatever secret store
backs the cluster (Vault, cloud KMS-backed secret managers,
sealed-secrets) — a secrets engine path convention like
secret/data/<team>/<environment>/* with policies scoped to match, so
a namespace's RBAC boundary and its secrets-access boundary are the
same boundary, not two separately-configured systems that can drift
apart.
Align the software catalog's ownership model to the same tenant
boundary, so a team's catalog/self-service permissions match its
actual infrastructure access — a Backstage Group entity, a Port
team blueprint, or an OpsLevel team mapping to the same namespace/
environment scope defined in steps 2–3, not a separately-maintained
permission model that can drift out of sync with the real RBAC
bindings:
# Backstage catalog-info.yaml
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: checkout-api
spec:
owner: group:checkout-team
# the k8s namespace this maps to, so RBAC/catalog stay aligned
annotations:
kubernetes.io/namespace: checkout-team-production
Route dedicated-infrastructure decisions through an explicit exception process, the same discipline as a golden-path escape hatch — a team asking for a dedicated cluster "for isolation" should name the specific compliance/blast-radius/capacity requirement that namespace-per-team with quotas and network policy doesn't satisfy, rather than defaulting every request to dedicated infrastructure because it feels safer.
RoleBinding.ResourceQuota with a LimitRange — a quota alone doesn't
prevent a single unbounded container from starving a namespace before
the aggregate quota is reached.NetworkPolicy before
relying on it for isolation — some CNI configurations silently accept
the object without enforcing it, which is a false sense of security
worse than not having the policy at all.Symptom: A single team's misconfigured batch job schedules
thousands of unbounded pods, and every other team's workloads on the
same shared cluster start getting evicted or fail to schedule.
Fix: No ResourceQuota/LimitRange was enforcing a ceiling on that
namespace — add both (step 4), and treat every namespace provisioned
through the platform as required to have them set from creation, not
as an opt-in a team can skip.
Symptom: A security review discovers that a RoleBinding intended
to scope checkout-team to their own namespace was actually a
ClusterRoleBinding, granting them read access to every other team's
secrets cluster-wide.
Fix: Audit for ClusterRoleBinding/ClusterRole usage granted to
team groups and replace with namespace-scoped Role/RoleBinding
(step 3) unless a capability is genuinely cluster-wide by nature (e.g.
a platform-team's own operator) — a cluster-wide grant "to avoid
repeating the RBAC config per namespace" is a common but serious
over-grant.
Symptom: Two teams' pods on the same shared cluster can reach each
other's internal service endpoints directly, and a security audit flags
this as a lateral-movement risk during an incident review.
Fix: RBAC controls the Kubernetes API, not pod-to-pod network
traffic — add a default-deny NetworkPolicy per namespace (step 5) and
confirm the CNI actually enforces it; RBAC isolation alone is
frequently mistaken for full tenant isolation when it only covers one
of the two layers that matter.
Symptom: A team is granted a fully dedicated cluster because they "wanted stronger isolation," and eighteen months later the platform team is operating a dozen near-identical single-tenant clusters with no shared efficiency and a full upgrade/patch burden multiplied by twelve. Fix: Route dedicated-infrastructure requests through an explicit exception process (step 8) that requires naming the specific requirement namespace-per-team with quotas/network policy doesn't satisfy — "wanted stronger isolation" without a specific gap named is not sufficient justification, and it's cheaper to close a genuine gap in the shared model (e.g. add a missing network policy) than to operate another dedicated cluster indefinitely.
Symptom: A team's catalog entry in the software portal lists them
as owning checkout-api, but their actual Kubernetes RBAC access maps
to a differently-named namespace after an unrelated rename, and nobody
updated the catalog's annotation — leading to a confused on-call
handoff during an incident where the responding engineer's kubectl
access didn't match what the catalog implied.
Fix: Treat the catalog's namespace/environment annotation (step 7)
as generated from the same source of truth as the RBAC binding (e.g.
both derived from the same team-onboarding automation), not two
independently hand-maintained records that can silently diverge.
Scenario: A platform team is onboarding 15 product teams onto a shared Kubernetes cluster for the first time, replacing a prior model where each team had requested (and gotten) their own small cluster, which had become expensive and slow to patch consistently. One team processes payment data under PCI scope and needs to justify whether they still need dedicated infrastructure under the new model.
<team>-production and <team>-staging namespace pair, created
through the platform's self-service onboarding flow, which also
applies RBAC, quota, and network policy in the same automation run —
never a manual kubectl create namespace a team could request without
the accompanying controls.Role/RoleBinding scoped to
that team's IdP group, granting deployment/service/configmap
management and read-only secret access — no ClusterRoleBinding
anywhere in the 14 namespaces.ResourceQuota sized from
the team's prior dedicated-cluster usage history (avoiding either
starving them relative to what they actually used, or over-allocating
the shared cluster's capacity), plus a default LimitRange so no
single unbounded pod can consume it all at once.NetworkPolicy (not assumed).Group entity
and their services' catalog-info.yaml owner/namespace annotation
are generated by the same onboarding automation that created the
namespace and RBAC bindings, so the three stay in sync by construction
rather than by separate manual upkeep.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
multi-tenancy, idp, platform-engineering, kubernetes, rbac, namespace-isolation
20 skills in this plugin
/backstage-plugin-developmentGuides authoring a custom Backstage plugin — scaffolding a frontend or backend plugin package with `yarn new`, wiring a frontend API client via `createApiRef`, building a backend plugin on the new backend system (`createBackendPlugin`), and registering either into the app's routes or an entity page tab. Use when a user asks to "write a custom Backstage plugin," "add a backend plugin to Backstage," "build a Backstage frontend component that talks to a new API," or "create a Backstage plugin that surfaces X" — this goes beyond catalog/TechDocs/template configuration.
/complete-idp-deployment-on-aws-from-scratchSequences a complete, from-scratch Internal Developer Platform deployment on AWS: landing zone → EKS cluster → Helm-deployed Backstage backed by RDS PostgreSQL → golden-path scaffolding template → self-service API wired to AWS provisioning (IRSA roles, RDS instances) → scorecards. This is the integration runbook that orders the individual AWS/EKS/Backstage skills correctly and flags the handoffs between them. Use when a user asks to "deploy an IDP on AWS from scratch," "stand up Backstage on EKS end-to-end," "build our internal developer platform on AWS," "wire self-service database/IAM provisioning into Backstage on AWS," or "sequence an AWS platform rollout from account creation to golden-path templates."
/complete-idp-deployment-on-azure-from-scratchSequences a complete, from-scratch Internal Developer Platform deployment on Azure: landing zone → AKS cluster → Helm-deployed Backstage backed by Azure Database for PostgreSQL Flexible Server → golden-path scaffolding template → self-service API wired to Azure provisioning (Azure AD Workload Identity federated credentials, Flexible Server instances) → scorecards. This is the integration runbook that orders the individual Azure/AKS/Backstage skills correctly and flags the handoffs between them. Use when a user asks to "deploy an IDP on Azure from scratch," "stand up Backstage on AKS end-to-end," "build our internal developer platform on Azure," "wire self-service database/identity provisioning into Backstage on AKS," or "sequence an Azure platform rollout from subscription vending to golden-path templates."
/complete-idp-deployment-on-gcp-from-scratchSequences a complete, from-scratch Internal Developer Platform deployment on GCP: landing zone → GKE cluster → Helm-deployed Backstage backed by Cloud SQL for PostgreSQL → golden-path scaffolding template → self-service API wired to GCP provisioning (Workload Identity Federation bindings, Cloud SQL instances) → scorecards. This is the integration runbook that orders the individual GCP/GKE/Backstage skills correctly and flags the handoffs between them. Use when a user asks to "deploy an IDP on GCP from scratch," "stand up Backstage on GKE end-to-end," "build our internal developer platform on Google Cloud," "wire self-service database/identity provisioning into Backstage on GKE," or "sequence a GCP platform rollout from project vending to golden-path templates."
/complete-idp-deployment-on-k3s-from-scratchSequences a lightweight Internal Developer Platform deployment on K3s for edge, on-prem, and development contexts where a full Backstage footprint isn't justified: K3s install → a resource-right-sized IDP choice (slimmed single-replica Backstage vs. a hosted no-code catalog tool) → a thin golden-path template → minimal-governance self-service → lightweight scorecards, all explicitly scoped to small teams and constrained hardware rather than restating the full cloud/enterprise build. Use when a user asks to "set up a lightweight internal developer platform," "run Backstage or a service catalog on K3s," "build a dev-team-sized IDP without enterprise overhead," "stand up a platform for an edge or small on-prem deployment," or "decide whether a full Backstage is overkill for our team size."
/complete-idp-deployment-on-kubernetes-from-scratchSequences a complete, cloud-agnostic Internal Developer Platform deployment on any CNCF-conformant Kubernetes cluster: cluster conformance validation → cluster add-ons (ingress, TLS, in-cluster storage) → Helm-deployed Backstage backed by an in-cluster PostgreSQL instance → golden-path scaffolding template → self-service scaffolder actions calling generic Kubernetes/Crossplane APIs, deliberately not tied to one cloud's IAM or managed-database provisioning APIs → scorecards. Use when a user asks to "deploy an IDP on Kubernetes without tying it to one cloud," "build a portable/cloud-agnostic internal developer platform," "stand up Backstage on any conformant cluster," "design self-service provisioning that doesn't assume AWS/Azure/GCP," or "sequence a vendor-neutral platform rollout on Kubernetes."
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin idp-skillsOther plugins' skills for the same job