$cm = $this->cluster
->configmap()
->setName('certificates')
->setLabels(['tier' => 'backend'])
->setData([
'key.pem' => '...',
'ca.pem' => '...',
])
->create();
Starting with Kubernetes v1.21.0, ConfigMaps support immutability. If you do not specify the immutable()
method, it will default to false:
$cm = $this->cluster
->configmap()
...
->immutable()
->create();
$cm->isImmutable(); // true