Failed to remove fluent-bit package using 'tanzu package installed delete' command.
search cancel

Failed to remove fluent-bit package using 'tanzu package installed delete' command.

book

Article ID: 376137

calendar_today

Updated On:

Products

VMware vSphere with Tanzu

Issue/Introduction

When attempting to remove fluent-bit package using the command line of "tanzu package installed delete fluent-bit -n tanzu-system-logging"  it fails with the error:

"Error: resource deletion failed: Preparing kapp: Getting service account: serviceaccounts "fluent-bit-tanzu-system-logging-sa" not found. Delete failed: Error (see .status.usefulErrorMessage for details)"

 

Environment

vSphere with Tanzu 

Cause

The service account "fluent-bit-tanzu-system-logging-sa" associated with the fluent-bit package has been deleted already and it is not found.
As the service account is missing, it is failing to remove the package. 

Resolution

Remove the finalizer from the fluent-bit app as below:

$ kubectl edit app fluent-bit -n tanzu-system-logging 
:
metadata:
  finalizers:
  - finalizers.kapp-ctrl.k14s.io/delete    ###<<< Delete this line and save & exit the editor.
  generation: 1
  name: fluent-bit
  namespace: tanzu-system-logging
:

Once the finalizer has been removed, the removal of the fluent-bit package will also be completed automatically.

    •  

Additional Information