ServiceAccount

Default version: v1

Example

$sa = $this->cluster
    ->serviceAccount()
    ->setName('user1')
    ->addSecrets(['someSecret'])
    ->addPulledSecrets(['postgres'])
    ->create();

Secret attachment

You can also pass the secrets as K8sSecret instances:

$secret = $this->cluster
    ->secret()
    ->setName('passwords')
    ->addData('postgres', 'postgres')
    ->create();

$sa->addSecrets([$secret])->update();

Last updated