Kubernetes icon

Kubernetes

Interact with Kubernetes

StatefulSets → Restart

AI-generated

Overview

This node interacts with Kubernetes to perform various operations on Kubernetes resources. Specifically, for the StatefulSets resource with the Restart operation, it triggers a restart of a specified StatefulSet within a given namespace. This is useful for scenarios where you need to refresh or redeploy StatefulSet pods without deleting the entire resource. For example, restarting a StatefulSet can help apply configuration changes or recover from transient errors without downtime.

Use Case Examples

  1. Restart a StatefulSet named 'my-statefulset' in the 'default' namespace to refresh its pods.
  2. Automate the restart of StatefulSets as part of a CI/CD pipeline to apply updates.

Properties

Name Meaning
Image The container image associated with the operation, relevant for run, restart, exec, and patch operations.
Namespace The Kubernetes namespace where the StatefulSet resource resides.
Resource Name The name of the StatefulSet resource to operate on.

Output

JSON

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

Dependencies

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

Troubleshooting

  • Ensure that the Kubernetes credentials provided have sufficient permissions to restart StatefulSets in the specified namespace.
  • Verify that the 'Resource Name' is correctly specified; missing or incorrect names will cause errors.
  • Common error: 'Resource name is required for restart operation!' indicates that the resourceName parameter was not provided or is empty. Provide a valid StatefulSet name to resolve this.

Links

Discussion