Skip to content

Commit

Permalink
Troubleshooting - namespace stuck terminating (#1795)
Browse files Browse the repository at this point in the history
* adding troubleshooting for terminating namespace

* Update site/content/en/docs/Guides/troubleshooting.md

Co-authored-by: Alexander Apalikov <[email protected]>
  • Loading branch information
domgreen and aLekSer authored Sep 11, 2020
1 parent a9128db commit 697a9ca
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 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,43 @@ 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": [
"kubernetes"
]
},
```

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.

0 comments on commit 697a9ca

Please sign in to comment.