Kubernetes icon

Kubernetes

Interact with Kubernetes

Overview

This node interacts with Kubernetes clusters to perform various operations on Kubernetes resources. Specifically, for the 'Services' resource with the 'Restart' operation, it allows restarting a Kubernetes service within a specified namespace. This is useful for scenarios where a service needs to be refreshed or reset without deleting it entirely. Practical examples include restarting a service after configuration changes or to recover from transient errors.

Use Case Examples

  1. Restarting a Kubernetes service named 'my-service' in the 'default' namespace to apply new configurations.
  2. Automating service restarts as part of a deployment pipeline to ensure updated services are running.

Properties

Name Meaning
Image The container image to use when running or restarting a pod (applicable for operations like run, restart, exec, patch).
Namespace The Kubernetes namespace where the service or resource is located. Defaults to 'default'.
Resource Name The name of the specific Kubernetes resource (e.g., service) to operate on.

Output

JSON

  • stdout - The standard output from running or restarting the pod, containing the result or logs of the operation.

Dependencies

  • Requires Kubernetes API credentials to authenticate and interact with the Kubernetes cluster.

Troubleshooting

  • If no credentials are returned, the node will throw an error indicating missing Kubernetes API credentials. Ensure credentials are properly configured.
  • The 'command' parameter must be a valid JSON array when running pods; otherwise, an error is thrown.
  • If the specified resource or namespace does not exist, the operation will fail. Verify resource names and namespaces are correct.

Discussion