Skip to main content

Kubernetes Tasks

Specialized tasks for Kubernetes resource management, optimization, and operations.

k8s.vertical_rightsize

Display Name: Vertical Rightsize

Optimize CPU and memory requests/limits for a Kubernetes workload. Can apply changes directly or create a GitOps pull request.

Parameters

NameTypeRequiredDescription
namespacestringYesKubernetes namespace.
namestringYesWorkload name.
kindstringYesResource kind (e.g., Deployment, StatefulSet, DaemonSet).
directionstringNoScaling direction. Options: up, down.
cpuobjectNoCPU configuration: change_pct (number, required — percentage to change), max (string, e.g., "1"), min (string, e.g., "10m"), remove_limit (boolean).
memoryobjectNoMemory configuration: change_pct (number, required — percentage to change), max (string, e.g., "1Gi"), min (string, e.g., "100Mi"), remove_limit (boolean).
gitops_configobjectNoGitOps config: enabled (boolean) — if true, creates a PR instead of applying directly.
account_idaccountNoNudgebee account ID.

Output

NameTypeDescription
statusstringOperation result status.
patchobjectThe Kubernetes patch that was applied (or would be applied).
resolution_idstringResolution tracking ID.

k8s.horizontal_rightsize

Display Name: Horizontal Rightsize

Scale the number of replicas for a Kubernetes workload up or down.

Parameters

NameTypeRequiredDescription
directionstringYesScaling direction. Options: up, down.
kindstringYesResource kind (e.g., Deployment, StatefulSet).
namespacestringYesKubernetes namespace.
namestringYesWorkload name.
scaling_modestringNoHow to scale. Options: change_by (relative), change_to (absolute).
change_bynumberNoAmount to change replicas by. Visible when scaling_mode is change_by.
change_tonumberNoTarget absolute replica count. Visible when scaling_mode is change_to.
minnumberNoMinimum replica count (floor).
maxnumberNoMaximum replica count (ceiling).
gitops_configobjectNoGitOps config: enabled (boolean) — if true, creates a PR.
account_idaccountNoNudgebee account ID.

Output

NameTypeDescription
statusstringOperation result.
old_replicasnumberPrevious replica count.
new_replicasnumberNew replica count.
patchobjectThe applied patch.
resolution_idstringResolution tracking ID.

k8s.pv_rightsize

Display Name: PV Rightsize

Resize a Kubernetes Persistent Volume Claim to match actual usage.

Parameters

NameTypeRequiredDescription
namespacestringYesKubernetes namespace.
namestringYesPVC name.
kindstringYesResource kind. Default: PersistentVolumeClaim.
change_bystringNoPercentage to increase storage (e.g., 10%). Only positive values (increase).
change_tostringNoTarget absolute storage size (e.g., 20Gi).
maxstringNoMaximum storage size allowed (e.g., 100Gi).
gitops_configobjectNoGitOps config: enabled (boolean).
account_idaccountNoNudgebee account ID.
resource_idstringNoResource ID for the target PVC (used for GitOps).

Output

NameTypeDescription
statusstringOperation result.
old_storagestringPrevious storage size.
new_storagestringNew storage size.
patchobjectThe applied patch.
resolution_idstringResolution tracking ID.

k8s.continuous_rightsize

Display Name: Continuous Rightsize

Continuously monitor and auto-adjust resources for Kubernetes workloads based on usage patterns.

Parameters

NameTypeRequiredDescription
action_paramsobjectYesConfiguration for continuous rightsizing analysis.
account_idaccountNoNudgebee account ID.

Output

NameTypeDescription
dataobjectRightsizing analysis results.

k8s.workload_restart

Display Name: Workload Restart

Perform a rolling restart of a Kubernetes workload to apply configuration changes or recover from issues.

Parameters

NameTypeRequiredDescription
namespacestringYesKubernetes namespace.
namestringYesWorkload or pod name.
kindstringYesResource kind (Deployment, StatefulSet, DaemonSet, Pod).
account_idaccountNoNudgebee account ID.

Output

NameTypeDescription
statusstringOperation result.
messagestringDetails about the restart.
restarted_kindstringKind of the restarted resource.
restarted_namestringName of the restarted resource.

k8s.pod_delete

Display Name: Pod Delete

Delete a Kubernetes pod to force a restart or clean up a stuck pod.

Parameters

NameTypeRequiredDescription
namespacestringYesKubernetes namespace.
namestringYesWorkload name or specific pod name.
kindstringNoResource kind. Default: Pod. If set to a workload kind (e.g., Deployment), deletes a pod owned by that workload.
target_pod_namestringNoSpecific pod to delete (when kind is a workload). If not set, the first found pod is deleted.
forcebooleanNoIf true, immediately removes the pod (--grace-period=0 --force). Useful for stuck pods.
account_idaccountNoNudgebee account ID.

Output

NameTypeDescription
statusstringOperation result.
deleted_podstringName of the deleted pod.
namespacestringNamespace of the deleted pod.

k8s.node_graceful_shutdown

Display Name: Node Graceful Shutdown

Safely drain and optionally remove a Kubernetes node. Cordons the node (prevents new scheduling), evicts all pods, then optionally deletes the node object.

Parameters

NameTypeRequiredDescription
namestringYesNode name to shut down.
delete_nodebooleanNoWhether to delete the node object after draining. Default: false.
ignore_pdbsbooleanNoIf true, bypasses PodDisruptionBudgets using deletion instead of eviction. Default: false.
account_idaccountNoNudgebee account ID.

Output

NameTypeDescription
statusstringOperation result.
nodestringNode name.
cordonedbooleanWhether the node was cordoned.
drainedbooleanWhether the node was drained.
deletedbooleanWhether the node was deleted.