Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Troubleshooting - namespace stuck terminating #1795

Merged
merged 6 commits into from
Sep 11, 2020
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions site/content/en/docs/Guides/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,3 +328,41 @@ kubectl create clusterrolebinding cluster-admin-binding \

On GKE, `gcloud config get-value accounts` will return a lowercase email address, so if
you are using a CamelCase email, you may need to type it in manually.

## I'm getting stuck in "Terminating" when I uninstall Agones

If you try to uninstall the `agones-system` namespace before you have removed all of the components in the namespace you may
end up in a `Terminating` state.

```bash
kubectl get ns
NAME STATUS AGE
agones-system Terminating 4d
```

Fixing this up requires us to bypass the finalizer in Kubernetes ([article link](https://www.ibm.com/support/knowledgecenter/en/SSBS6K_3.1.1/troubleshoot/ns_terminating.html)), by manually changing the namespace details:

First get the current state of the namespace:
```bash
kubectl get namespace agones-system -o json >tmp.json
```

Edit the response `tmp.json` to remove the finalizer data, for example remove the following:
```json
"spec": {
"finalizers":
domgreen marked this conversation as resolved.
Show resolved Hide resolved
},
```

Open a new terminal to proxy traffic:
```bash
kubectl proxy
Starting to serve on 127.0.0.1:8001
```

Now make an API call to send the altered namespace data:
```bash
curl -k -H "Content-Type: application/json" -X PUT --data-binary @tmp.json http://127.0.0.1:8001/api/v1/namespaces/agones-system/finalize
```

You may need to clean up any other Agones related resources you have in your cluster at this point.