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

How to delete arangodeployments ? #1284

Closed
raphael10-collab opened this issue Apr 6, 2023 · 2 comments
Closed

How to delete arangodeployments ? #1284

raphael10-collab opened this issue Apr 6, 2023 · 2 comments

Comments

@raphael10-collab
Copy link

raphael10-collab commented Apr 6, 2023

I'm having difficulty in deleting existing arangodeployments :

root@k8s-eu-1-master:~# kubectl get arangodeployments -o wide
NAME                      AGE
arangocluster             21d
cluster                   174m
cluster-using-local-ssh   8h

root@k8s-eu-1-master:~# kubectl delete arangodeployments arangocluster --force
Warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
arangodeployment.database.arangodb.com "arangocluster" force deleted

root@k8s-eu-1-master:~# kubectl get arangodeployments -o wide
NAME                      AGE
arangocluster             21d
cluster                   176m
cluster-using-local-ssh   8h

And I didn't succeed in applying what is suggested here: #224 (comment) :

root@k8s-eu-1-master:~# kubectl -n default get pod | grep 'agnt\|prmr' | awk '{print $1}' | xargs -ri kubectl -n default patch pod {} -p '{"metadata":{"finalizers":[]}}' --type=merge
No resources found in default namespace.
root@k8s-eu-1-master:~# kubectl get pod | grep 'agnt\|prmr' | awk '{print $1}' | xargs -ri kubectl patch pod {} -p '{"metadata":{"finalizers":[]}}' --type=merge
No resources found in default namespace.

And I also didn't succeed using the arangoDeployment.yaml file :

root@k8s-eu-1-master:~# kubectl delete -f arangoDeployment.yaml 
arangodeployment.database.arangodb.com "cluster" deleted
^Croot@k8s-eu-1-master:~# 
root@k8s-eu-1-master:~# kubectl get arangodeployments
NAME                      AGE
arangocluster             21d
cluster                   3h51m
cluster-using-local-ssh   9h
@jwierzbo
Copy link
Collaborator

jwierzbo commented Apr 6, 2023

@raphael10-collab you need to have operator running to handle the arangodeployment delete request.

If there is no more operator you can try to remove finalizer from particular arangodeployment and then remove it

@raphael10-collab
Copy link
Author

@jwierzbo I found how to remove the finalizer from the particular arangodeployment:

root@k8s-eu-1-master:~# kubectl patch ArangoDeployment/cluster --type json --patch='[ { "op": "remove", "path": "/metadata/finalizers" } ]'
arangodeployment.database.arangodb.com/cluster patched
root@k8s-eu-1-master:~# 
root@k8s-eu-1-master:~# 
root@k8s-eu-1-master:~# kubectl get arangodeployments
NAME                      AGE
arangocluster             21d
cluster-using-local-ssh   9h
root@k8s-eu-1-master:~# 
root@k8s-eu-1-master:~# kubectl patch ArangoDeployment/arangocluster --type json --patch='[ { "op": "remove", "path": "/metadata/finalizers" } ]'
arangodeployment.database.arangodb.com/arangocluster patched
root@k8s-eu-1-master:~# kubectl get arangodeployments
NAME                      AGE
cluster-using-local-ssh   9h
root@k8s-eu-1-master:~# kubectl patch ArangoDeployment/cluster-using-local-ssh --type json --patch='[ { "op": "remove", "path": "/metadata/finalizers" } ]'
arangodeployment.database.arangodb.com/cluster-using-local-ssh patched
root@k8s-eu-1-master:~# kubectl get arangodeployments
No resources found in default namespace.

Thank you @jwierzbo !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants