Skip to content

Instantly share code, notes, and snippets.

@ianhomer
ianhomer / gist:fc2a69f041bf5dc8519896cbeadc9e79
Last active June 30, 2025 09:14
Kubernetes namespace stuck in terminating. Remove finalizers from resources.
kubectl api-resources --verbs=list --namespaced -o name |
xargs -n 1 kubectl get --ignore-not-found -n my-namespace -o name |
xargs -n 1 kubectl patch -n my-namespace -p '{"metadata":{"finalizers":null}}' --type merge
# Create alpine bastion (that will live for a day)
kubectl -n my-namespace run bastion --image alpine --command sleep -- 1d
# Exec onto bastion -
# -i = interactive mode
# -t = tty terminal mode
kubectl -n my-namespace -it exec bastion -- ash
# Delete bastion
kubectl -n my-namespace delete pod bastion
brew install colima docker docker-compose
colima start --network-address
# vi ~/.docker/config.json if historical config from docker desktop