Skip to content

K8sConfigMap

K8sConfigMap creates a Kubernetes ConfigMap in the target cluster. ConfigMaps store non-sensitive configuration data that can be consumed by pods as environment variables, command-line arguments, or volume mounts.

Property Type Required Description
cluster KubernetesCluster | string Target cluster
namespace K8sNamespace | string Namespace to create the ConfigMap in
dependsOn string[] Explicit dependency ordering
data Record<string, string> Key-value pairs of configuration data
binaryData Record<string, string> Binary data as base64-encoded strings
const appConfig = new K8sConfigMap({
name: 'app-config',
cluster: myCluster,
namespace: myNamespace,
data: {
'APP_ENV': 'production',
'LOG_LEVEL': 'info',
'API_URL': 'https://api.example.com',
},
})
Provider Supported
Kubernetes
Hetzner
DigitalOcean
AWS
GCP