Removing the Pending Resources from Namespace

It is observed that some resources are not deleted while removing the deployment. Perform the following procedure to remove pending resources from namespace.
  1. Execute the following command to check the presence of pending resources:
    $ kubectl get all -n <release-namespace>
     kubectl get all -n ocnrf
     
     NAME                                     READY   UP-TO-DATE   AVAILABLE   AGE
     deployment.apps/ocnrf-appinfo            1/1     1            1           4d21h
     deployment.apps/ocnrf-egressgateway      1/1     1            1           4d21h
     
     And we need to delete the deployment of app-info
     
     kubectl delete deployment ocnrf-appinfo -n ocnrf
     
     deployment.extensions "ocnrf-appinfo" deleted
    The system retrieves a detailed overview of the current objects of <release-namespace>.
  2. Execute the following command to delete pending resources from namespace:
    $ kubectl delete <resource-type> <resource-name> -n <release-namespace>
  3. Caution:

    The command in this step removes all the resources.
    Execute the following command to clean up all the pending resources and remove all the Kubernetes objects:
    kubectl delete all --all -n <release-namespace>