NAME

DBIO::Test::Kubernetes - Provision temporary database pods in Kubernetes for DBIO testing

VERSION

version 0.900000

SYNOPSIS

my $k8s = DBIO::Test::Kubernetes->new(
    kubeconfig => $path,
    databases  => [qw(pg mysql)],
);

$k8s->deploy_databases;
$k8s->wait_for_ready;

# Local mode: port-forward and get env vars
$k8s->setup_port_forwards;
my %env = $k8s->env_vars;
local @ENV{keys %env} = values %env;
system('prove', '-Ilib', 't/');

$k8s->cleanup;

DESCRIPTION

DBIO::Test::Kubernetes provisions temporary PostgreSQL and MySQL test databases inside Kubernetes and exposes the corresponding DBIO_TEST_* environment variables for local or in-cluster test runs.

It is intended for integration-style test runs that need short-lived database instances without hand-managed local services or bespoke local containers.

AUTHOR

DBIO & DBIx::Class Authors

COPYRIGHT AND LICENSE

Copyright (C) 2026 DBIO Authors Portions Copyright (C) 2005-2025 DBIx::Class Authors Based on DBIx::Class, heavily modified.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.