Skip to content

K8s ConfigMap

Andy Potanin edited this page Jun 21, 2026 · 1 revision

Creates a Kubernetes ConfigMap from a native manifest definition.

Use this module when a Rabbit service needs environment variables or configuration files delivered as a ConfigMap to pods in the cluster.

Supported Features

  • ConfigMap creation from a standard Kubernetes manifest.
  • data and binaryData fields.
  • Labels and annotations.

Prerequisites

  • A kubeconfig secret created by the k8s-access module.
  • The target namespace must exist.

Important Notes

  • The configurations key accepts a complete Kubernetes ConfigMap manifest (without apiVersion and kind).
  • The module reads metadata.name, metadata.namespace, data, and binaryData from the manifest.

Minimal Example

services:
  - name: "k8s ConfigMap"
    module: "k8s-configmap"
    id: "app-configmap"
    deployment_order: 95
    configurations:
      metadata:
        name: "app-config"
        namespace: "www-example-com"
        labels:
          app: "www-example-com"
      data:
        DB_HOST: "10.0.0.1"
        DB_NAME: "production"
        WP_ENV: "production"

Outputs

This module does not produce outputs.

Full Configuration Schema

The configurations key accepts a native Kubernetes ConfigMap manifest body.

configurations:
  metadata:
    name: ""
    namespace: ""
    labels: {}
    annotations: {}
  data: {}
  binaryData: {}
Field Type Required Description
metadata.name string Yes ConfigMap name.
metadata.namespace string Yes Target namespace.
metadata.labels map[string] No Kubernetes labels.
metadata.annotations map[string] No Kubernetes annotations.
data map[string] No String key-value pairs.
binaryData map[string] No Base64-encoded binary key-value pairs.

Clone this wiki locally