← All posts

Giving people their own space in Zebra

I share the services I run with a small circle of family and friends. Some also use Zebra, my Kubernetes cluster, to build and run applications of their own. This is a personal setup shared with people I know, not a public hosting business.

Tenant access is the lowest level I share: access to the underlying application infrastructure, beyond simply using an existing service. It doesn't mean a basic subscription tier or administrator access to everything.

I want people to make changes without needing me each time, while keeping mistakes from affecting everyone else's services. That takes more than creating a Kubernetes namespace, the named grouping for an application's resources.

Getting from an idea to a running application

Tenant membership is linked to an Authentik identity group. Onboarding provisions a GitLab project and configuration for the primary namespace. Continuous integration jobs validate changes, and Flux reconciles the deployment using the tenant's permissions.

A server-side dry-run asks Kubernetes to check the resources without saving them. Using the deploying identity matters: something accepted as an administrator may still be forbidden for the person making the change.

The shared tooling includes GitLab runners for builds, Harbor for container images and vulnerability scanning, and alerting and capacity controls. CrowdSec application-security middleware is applied to tenant ingress by default. These save people setting up every supporting service themselves, but scans and filtering don't guarantee an application is safe.

Person -> own configuration -> validation as tenant
                                      |
                              tenant namespace
                              scoped permissions
                              shared guardrails
                                      |
                              shared infrastructure

Keeping the shared bits usable

Quotas bound resource use. Permissions limit changes. Network policies constrain reachability, and admission rules restrict choices such as host access, scheduling, and exposed hostnames. Capsule supports additional tenant namespaces under the same tenant-wide rules.

Applications can use Garage buckets with tenant-scoped credentials and quotas too. Sharing the object store should not grant access to someone else's data.

The point is to contain mistakes while allowing independent use. These controls don't make shared kernels, administrators, or storage independent. I'm not presenting this cluster as a suitable home for arbitrary hostile workloads.

A useful check tries an operation that should be denied: changing another person's resources or requesting forbidden host access. Successful deployment alone doesn't test the boundary. The security article explains those checks, and why declared quotas don't reserve physical capacity by themselves.

Knowing who looks after what

Someone deploying an application needs to see whether it works. Owner-specific alert routes help with that; shared infrastructure alerts remain my responsibility. An application failure and a failed NAS shouldn't leave everyone assuming the other person has it covered.

Departure also needs care. My offboarding workflow proposes removal through a merge request rather than silently deleting a namespace when membership changes. Merging the removal is destructive. Removing access and deleting data are different decisions.

The data still shares the platform's physical risks. Independent deployment doesn't supply an independent off-site recovery system, so the backup failure cases apply here too.

For a few applications, managing them directly may be simpler. This machinery is worthwhile when people want to deploy independently often enough to justify it. I like being able to offer that without becoming the person who has to make every edit — while remaining honest about the shared responsibilities underneath.

← Back to the notebook