简体   繁体   中英

How can I empty an airflow worker deployed via Docker on Kubernetes cluster?

I had deployed airflow on my cluster which was not well written, hence, filled up space. Now, I have improved my code but need to empty the old data. How can I achieve that since my workers are associated with a persistent volume?

When I enter the pod, I run the command:

rm -rf /usr/local/airflow/*

I get the following error:

rm: cannot remove '/usr/local/airflow/logs': Device or resource busy
rm: cannot remove '/usr/local/airflow/rootfs': Device or resource busy

You need to umount those devices and then try to remove it:

umount /usr/local/airflow/logs /usr/local/airflow/rootfs
rm -rf /usr/local/airflow/logs /usr/local/airflow/rootfs

Hope this helps

In order to delete all the contents, I ran the command: rm -rf /usr/local/airflow/rootfs/*

The asterisk, in the end, made all the change as it told the system to remove all the contents and not the directory itself. This made no interaction with any mounted storage whatsoever.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM