今天給大家介紹一下刪除ns后一直處于Terminating狀態(tài)中該怎么辦。文章的內(nèi)容小編覺得不錯,現(xiàn)在給大家分享一下,覺得有需要的朋友可以了解一下,希望對大家有所幫助,下面跟著小編的思路一起來閱讀吧。
創(chuàng)新互聯(lián)建站網(wǎng)站建設(shè)公司,提供做網(wǎng)站、成都網(wǎng)站設(shè)計,網(wǎng)頁設(shè)計,建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);可快速的進(jìn)行網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴展;專業(yè)做搜索引擎喜愛的網(wǎng)站,是專業(yè)的做網(wǎng)站團隊,希望更多企業(yè)前來合作!
強制刪除也是出現(xiàn)報錯
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. Error from server (Conflict): Operation cannot be fulfilled on namespaces "devtesting": The system is ensuring all content is removed from this namespace. Upon completion, this namespace will automatically be purged by the system.
kubectl get namespace devtesting -o json > devtesting.json
# cat devtesting.json { "apiVersion": "v1", "kind": "Namespace", "metadata": { "annotations": { "cattle.io/status": "{\"Conditions\":[{\"Type\":\"ResourceQuotaInit\",\"Status\":\"True\",\"Message\":\"\",\"LastUpdateTime\":\"2019-09-23T07:24:02Z\"},{\"Type\":\"InitialRolesPopulated\",\"Status\":\"True\",\"Message\":\"\",\"LastUpdateTime\":\"2019-09-23T07:24:02Z\"}]}", "lifecycle.cattle.io/create.namespace-auth": "true" }, "creationTimestamp": "2019-09-23T07:23:03Z", "deletionTimestamp": "2019-09-30T06:35:09Z", "labels": { "name": "devtesting" }, "name": "devtesting", "resourceVersion": "6153812", "selfLink": "/api/v1/namespaces/devtesting", "uid": "a00e013b-0066-4b64-915d-05acde5c9a09" }, "spec": { "finalizers": [ "kubernetes" ] }, "status": { "phase": "Terminating" } }
刪除其中的spec字段,因為k8s集群是攜帶認(rèn)證的
執(zhí)行以下curl命令,使用kube-apiserver的8080端口,執(zhí)行刪除操作
curl -k -H "Content-Type: application/json" -X PUT --data-binary @devtesting.json http://127.0.0.1:8080/api/v1/namespaces/devtesting/finalize
備注:
如果kube-apiserver未開非安全端口,可以手動創(chuàng)建一個代理會話,
# kubectl proxy --port=8081 # curl -k -H "Content-Type: application/json" -X PUT --data-binary @devtesting.json http://127.0.0.1:8081/api/v1/namespaces/test/finalize
以上就是刪除ns后一直處于Terminating狀態(tài)中該怎么辦的全部內(nèi)容了,更多與刪除ns后一直處于Terminating狀態(tài)中該怎么辦相關(guān)的內(nèi)容可以搜索創(chuàng)新互聯(lián)之前的文章或者瀏覽下面的文章進(jìn)行學(xué)習(xí)哈!相信小編會給大家增添更多知識,希望大家能夠支持一下創(chuàng)新互聯(lián)!
分享題目:刪除ns后一直處于Terminating狀態(tài)中該怎么辦
網(wǎng)頁網(wǎng)址:http://www.rwnh.cn/article38/peopsp.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供虛擬主機、關(guān)鍵詞優(yōu)化、域名注冊、企業(yè)網(wǎng)站制作、網(wǎng)站維護、網(wǎng)站營銷
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)