- OpenShift Cookbook
- Shekhar Gulati
- 238字
- 2021-08-05 17:37:40
Deleting a domain using rhc
You created a domain for testing and now you no longer require it. Naturally, you would like to delete the domain.
Getting ready
To complete the steps in this recipe, you will need rhc to be installed on your machine.
How to do it…
You should run the following command to delete a domain:
$ rhc delete-domain --namespace testosbook
Note
Once the domain is deleted, there is no way to undo it. So, please use this command with precaution.
How it works…
The rhc delete-domain
command will delete the domain by making a REST delete call to the OpenShift service. If your domain contains an application, you will not be able to delete the domain. Instead, you will get an error message:
$ rhc delete-domain --namespace testosbook Deleting domain 'testosbook' ... Domain contains applications. Delete applications first or set force to true.
Therefore, to delete a domain with an application, you have to pass a –force
flag. This will delete the domain and all the applications associated with it.
There's more…
The OpenShift web console also allows you to delete members from a domain. Go to https://openshift.redhat.com/app/console/domain/{domain-name} and replace {domain-name}
with the domain name in which you want to delete a member. Click on the Delete this domain… button to delete it. This is shown in the following screenshot:

See also
- The Renaming a domain using rhc recipe
- C++黑客編程揭秘與防范
- 物聯網工程規劃技術
- Mastering Machine Learning for Penetration Testing
- 光網絡評估及案例分析
- Hands-On Full Stack Development with Spring Boot 2 and React(Second Edition)
- 中小型局域網組建、管理與維護實戰
- 智慧光網絡:關鍵技術、應用實踐和未來演進
- The Kubernetes Workshop
- Learning Storm
- Android UI Design
- AIoT應用開發與實踐
- 移動互聯網新思維
- 智能物聯網:區塊鏈與霧計算融合應用詳解
- 從實踐中學習Kali Linux網絡掃描
- 云計算、網絡安全和網絡盜竊:網絡世界防盜初學指南