Troubleshoot Kf Tasks

Use these steps to troubleshoot various issues that can occur when using Kf Tasks.

Object is stuck deleting.

Run the following command to get the resource information, then check for the causes listed below:

kubectl get tasks.kf.dev -n SPACE_NAME TASK_NAME -o yaml

The kf CLI can help check for some of the issues:

kf doctor --space SPACE_NAME task/TASK_NAME
Possible CauseSolution
Deletion timestamp is in the future.

With clock skew the metadata.deletionTimestamp may still be in the future. Wait a few minutes to see if the object is deleted.

Finalizers exist on the object.

Finalizers are present on the object, they must be removed by the controller that set them before the object is deleted.

If you want to force a deletion without waiting for the finalizers, edit the object to remove them from the metadata.finalizers array.

Warning: Removing finalizers without allowing the controllers to complete may cause errors, security issues, data loss, or orphaned resources.

Dependent objects may exist.

The object may be waiting on dependents to be deleted before it deleted. See the Kubernetes garbage collection guide to learn more. Have an administrator check all objects in the namespace and cluster to see if one of them is blocking deletion.

If you need to remove the object without waiting for dependents, use kubectl delete with the cascade flag set to: --cascade=orphan.