Portainer icon

Portainer

Interact with Portainer via API

Actions190

Kubernetes → Get Kubernetes Config Map

AI-generated

Overview

This node operation retrieves details of a specific Kubernetes ConfigMap within a given namespace. It is useful when you need to fetch configuration data stored in Kubernetes ConfigMaps for inspection, debugging, or further processing in your workflow. For example, you might use this node to dynamically read application configuration stored in a ConfigMap before deploying or updating services.

Properties

Name Meaning
Id Environment identifier (a numeric ID representing the Kubernetes environment to target)
Namespace The Kubernetes namespace where the ConfigMap resides
Configmap The name of the ConfigMap to retrieve

Output

The node outputs JSON data representing the full details of the requested ConfigMap. This typically includes metadata (like name, namespace, labels), and the data field containing key-value pairs stored in the ConfigMap. There is no indication that binary data is output by this node.

Dependencies

  • Requires access to a Kubernetes cluster environment identified by the provided environment ID.
  • Needs appropriate credentials or API tokens configured in n8n to authenticate with the Kubernetes API.
  • The node depends on Kubernetes API availability and permissions to read ConfigMaps in the specified namespace.

Troubleshooting

  • Common issues:
    • Incorrect or missing environment ID may cause failure to connect to the Kubernetes cluster.
    • Specifying a non-existent namespace or ConfigMap name will result in errors or empty responses.
    • Insufficient permissions to read ConfigMaps in the namespace can cause authorization errors.
  • Error messages:
    • "ConfigMap not found" indicates the specified ConfigMap does not exist in the given namespace.
    • Authentication or connection errors suggest misconfigured credentials or network issues.
  • Resolutions:
    • Verify the environment ID corresponds to a valid Kubernetes cluster setup.
    • Double-check namespace and ConfigMap names for typos.
    • Ensure the API token or credentials have read access to ConfigMaps in the target namespace.

Links and References

Discussion