Kubernetes icon

Kubernetes

Interact with Kubernetes

Pods → Restart

AI-generated

Overview

This node interacts with Kubernetes clusters to perform various operations on Kubernetes resources, specifically focusing here on the 'Restart' operation for Pods. It allows users to restart a specified Pod within a given namespace. This is useful for scenarios where a Pod needs to be refreshed or reset without deleting it manually, such as applying configuration changes or recovering from transient errors.

Use Case Examples

  1. Restart a Pod named 'my-pod' in the 'default' namespace to refresh its state.
  2. Automate Pod restarts as part of a deployment pipeline to ensure updated configurations are applied.

Properties

Name Meaning
Image The container image used in operations like run, restart, exec, and patch.
Namespace The Kubernetes namespace where the Pod resides.
Resource Name The name of the Pod resource to restart.

Output

JSON

  • json - The JSON response from the Kubernetes API after restarting the Pod, typically containing status or confirmation details.

Dependencies

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

Troubleshooting

  • Ensure that the 'Resource Name' (Pod name) is provided; otherwise, the node will throw an error indicating the resource name is required.
  • Verify that the Kubernetes credentials are correctly configured and valid; missing or invalid credentials will cause the node to fail.
  • Check that the specified namespace exists and the Pod is present in that namespace to avoid resource not found errors.
  • Common error messages include 'Resource name is required for restart operation!' which means the Pod name was not provided, and credential errors indicating authentication issues.

Links

Discussion