Picture this: a tiny Kubernetes cluster humming away on the edge, and a database that refuses to stay quietly in memory. You need persistence, identity, and speed. That’s where MariaDB on k3s earns its keep. The combo gives you production-grade data services in a footprint small enough to fit on a Raspberry Pi yet sturdy enough for CI pipelines or IoT fleets.
MariaDB brings battle-tested relational storage. k3s brings lightweight orchestration. Together they make a fast, manageable stack for teams that don’t want to choose between simplicity and control. A typical use case looks like this: microservices in k3s pods connect to a stateful MariaDB deployment, protected by Kubernetes secrets and external identity controls like OIDC or AWS IAM Roles for Service Accounts.
The integration workflow is straightforward once you think in Kubernetes terms. You define a StatefulSet for MariaDB, attach it to persistent volumes, and let k3s manage the lifecycle. Your services authenticate through known identities rather than hard-coded credentials. Traffic stays inside the cluster network, which reduces exposure. The real payoff comes when you automate that identity and access path. Instead of rotating passwords by hand, you map roles through the same provider that manages the rest of your infrastructure, whether it’s Okta, Azure AD, or GitHub Enterprise.
If your pod logs start shouting about connection refusals, it’s usually a timing issue. MariaDB initializes slower than lightweight app pods. Add a readiness probe or a small init container that waits for TCP 3306 to respond before your app starts up. Keep secrets in Kubernetes, not in the image. That way, scaling new replicas never leaks sensitive env vars during provisioning.
Main benefits of running MariaDB on k3s: