2

I'm trying to delete a file that is stored in persistent volume through CLI. I know the path but not sure how do I through CLI delete the file. Reason I want to do it through CLI is that I am automating a certain workflow that requires triggering of a powershell script that runs OpenShift CLI to delete a file in volume and scale down.

Daein Park
  • 4,393
  • 2
  • 12
  • 21
Julian Alwandy
  • 321
  • 1
  • 4
  • 13

1 Answers1

5

How about Executing Remote Commands feature to remove the file as follows.

For example,

# oc exec <pod name> -- rm -f /path/to/file.txt

I hope it help you.

Daein Park
  • 4,393
  • 2
  • 12
  • 21