Ferdinand
10/10/2024, 8:27 AM/usr/local/bin/k3s-uninstall.sh
[WARNING: This will delete all data in all namespaces])
- Manually cleanup the namespaces (sudo $(which kubectl) --kubeconfig /etc/rancher/k3s/k3s.yaml delete namespace united-manufacturing-hub
)
- If the manual cleanup also gets stuck you can attempt to remove the finalizers: sudo $(which kubectl) --kubeconfig /etc/rancher/k3s/k3s.yam get namespace "united-manufacturing-hub" -o json \
| tr -d "\n" | sed "s/\"finalizers\": \[[^]]\+\]/\"finalizers\": []/" \
| sudo $(which kubectl) --kubeconfig /etc/rancher/k3s/k3s.yam replace --raw /api/v1/namespaces/united-manufacturing-hub/finalize -f -
and then do a normal uninstall