Kubernetes icon

Kubernetes

Interact with Kubernetes

Namespaces → Patch

AI-generated

Overview

This node interacts with Kubernetes clusters to perform various operations on Kubernetes resources. Specifically, the 'Patch' operation allows users to update or modify an existing Kubernetes resource within a specified namespace by applying a JSON patch. This is useful for dynamically changing configurations or properties of Kubernetes resources without recreating them. Practical examples include updating deployment configurations, modifying service parameters, or adjusting namespace settings.

Use Case Examples

  1. Patching a namespace to add or update labels or annotations.
  2. Modifying a deployment's resource limits or environment variables via patch data.

Properties

Name Meaning
Image The container image to use, relevant for operations like run, restart, exec, and patch.
Namespace The Kubernetes namespace where the resource resides.
Resource Name The name of the specific Kubernetes resource to operate on.
Patch Data The JSON patch data to apply to the resource during the patch operation.

Output

JSON

  • json - The JSON response from the Kubernetes API after applying the patch operation, representing the updated resource state.

Dependencies

  • Requires Kubernetes API credentials for authentication and access to the cluster.

Troubleshooting

  • Ensure that the 'Resource Name' is provided; otherwise, the node throws an error indicating the resource name is required for the patch operation.
  • The 'Patch Data' must be valid JSON; invalid JSON will cause errors.
  • Kubernetes API credentials must be correctly configured and valid to avoid authentication errors.
  • The node throws an error if the specified operation is not implemented or supported.

Discussion