use RenokiCo\PhpK8s\K8s;
$container = K8s::container()
->setName('mysql')
->setImage('mysql', '5.7')
->setPorts([
['name' => 'mysql', 'protocol' => 'TCP', 'containerPort' => 3306],
]);
$pod = K8s::pod()
->setName('mysql')
->setLabels(['tier' => 'backend'])
->setContainers([$mysql]);
$dep = $this->cluster
->deployment()
->setName('mysql')
->setLabels(['tier' => 'server'])
->setSelectors(['matchLabels' => ['tier' => 'backend']])
->setReplicas(1)
->setTemplate($pod)
->create();
$pdb = $this->cluster
->podDisruptionBudget()
->setName('mysql-pdb')
->setSelectors(['matchLabels' => ['tier' => 'server']])
->setMinAvailable(3)
->create();
$pdb->refresh();
$status = $pdb->getStatus();