diff --git a/docs/user-manual.md b/docs/user-manual.md index a3cdf9d..3037c99 100644 --- a/docs/user-manual.md +++ b/docs/user-manual.md @@ -21,15 +21,26 @@ To stop the pie, follow these steps: $ NAMESPACE= $ kubectl -n ${NAMESPACE} scale deployments --replicas=0 pie ``` -2. Wait for Pods to stop. +2. Wait for the controller Pod to stop. ```console $ watch kubectl -n ${NAMESPACE} get pods ``` 3. Delete CronJobs (if exists). ```console - $ CRONJOBS_LIST=$(kubectl -n ${NAMESPACE} get cronjobs --no-headers=true | awk '{print $1}') + $ CRONJOBS_LIST=$(kubectl -n ${NAMESPACE} get cronjobs --no-headers=true | grep -E '^pie-probe-|^provision-probe-|^mount-probe-' | awk '{print $1}') $ [ -n "${CRONJOBS_LIST}" ] && kubectl -n ${NAMESPACE} delete cronjobs ${CRONJOBS_LIST} ``` +4. Remove the pie's finalizers for the Pods. + ```console + $ PODs=$(kubectl get pod -n ${NAMESPACE} -o json | jq -r '.items[] | .metadata.name' | grep -E '^pie-probe-|^provision-probe-|^mount-probe-') + $ for POD in ${PODs}; do + kubectl patch pod -n ${NAMESPACE} ${POD} --type='json' -p='[{"op": "remove", "path": "/metadata/finalizers"}]' + $ done + ``` +5. Wait for all the probe Pods to stop. + ```console + $ watch kubectl -n ${NAMESPACE} get pods + ``` ### Start the pie