Kubernetes icon

Kubernetes

Interact with Kubernetes

Deployments → Restart

AI-generated

Overview

This node interacts with Kubernetes clusters to perform various operations on Kubernetes resources. Specifically, for the 'Deployments' resource with the 'Restart' operation, it restarts a specified deployment within a given namespace. This is useful for scenarios where you need to refresh or redeploy an application without changing its configuration, such as applying updates or recovering from a failure.

Use Case Examples

  1. Restart a deployment named 'my-deployment' in the 'default' namespace to refresh the application pods.
  2. Use the node to automate deployment restarts as part of a CI/CD pipeline.

Properties

Name Meaning
Image The container image associated with the operation, relevant for some operations like run or restart.
Namespace The Kubernetes namespace where the deployment resides.
Resource Name The name of the deployment resource to restart.

Output

JSON

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

Dependencies

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

Troubleshooting

  • Ensure Kubernetes credentials are correctly configured; missing or invalid credentials will cause errors.
  • Resource name is mandatory for the restart operation; omitting it will throw an error.
  • Namespace defaults to 'default' if not specified, but ensure the deployment exists in the given namespace.
  • Common error: 'No credentials got returned!' indicates missing or misconfigured Kubernetes credentials.
  • If the operation is not supported or misspelled, an error will be thrown indicating the operation is not implemented.

Links

  • Kubernetes Deployments - Official Kubernetes documentation on Deployments, explaining their purpose and management.

Discussion