k8s rancher cattle-system 删除

gitlab安装

k8s rancher cattle-system 删除

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
[root@managementa ~]# kubectl get namespace cattle-system -o json
{
"apiVersion": "v1",
"kind": "Namespace",
"metadata": {
"annotations": {
"kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"name\":\"cattle-system\"}}\n"
},
"creationTimestamp": "2019-11-15T07:06:06Z",
"deletionTimestamp": "2019-11-18T06:19:15Z",
"name": "cattle-system",
"resourceVersion": "1078875",
"selfLink": "/api/v1/namespaces/cattle-system",
"uid": "3e15ccdc-a665-45bf-99e3-a2cd9d7937f2"
},
"spec": {
"finalizers": [
"kubernetes"
]
},
"status": {
"conditions": [
{
"lastTransitionTime": "2019-11-18T06:19:20Z",
"message": "Discovery failed for some groups, 1 failing: unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: the server is currently unable to handle the request",
"reason": "DiscoveryFailed",
"status": "True",
"type": "NamespaceDeletionDiscoveryFailure"
},
{
"lastTransitionTime": "2019-11-18T06:19:21Z",
"message": "All legacy kube types successfully parsed",
"reason": "ParsedGroupVersions",
"status": "False",
"type": "NamespaceDeletionGroupVersionParsingFailure"
},
{
"lastTransitionTime": "2019-11-18T06:19:21Z",
"message": "All content successfully deleted",
"reason": "ContentDeleted",
"status": "False",
"type": "NamespaceDeletionContentFailure"
}
],
"phase": "Terminating"
}
}
[root@managementa ~]# kubectl get namespace cattle-system -o json>cattle-system.json
[root@managementa ~]# vi cattle-system.json
"kubernetes"
"finalizers": [
"spec": {
"spec": {
{
"apiVersion": "v1",
"kind": "Namespace",
"metadata": {
"annotations": {
"kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"v1\"
,\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"name\":\"cattle-system\"}}\n
"
},
"creationTimestamp": "2019-11-15T07:06:06Z",
"deletionTimestamp": "2019-11-18T06:19:15Z",
"name": "cattle-system",
"resourceVersion": "1078875",
"selfLink": "/api/v1/namespaces/cattle-system",
"uid": "3e15ccdc-a665-45bf-99e3-a2cd9d7937f2"
},
"spec": {
},
"status": {
"conditions": [
{
"lastTransitionTime": "2019-11-18T06:19:20Z",
@
"cattle-system.json" 43L, 1728C written
[root@managementa ~]# curl -k -H "Content-Type: application/json" -X PUT --data-binary @cattle-system.json http://192.168.106.117:9090/api/v1/namespaces/cattle-system/finalize
{
"kind": "Namespace",
"apiVersion": "v1",
"metadata": {
"name": "cattle-system",
"selfLink": "/api/v1/namespaces/cattle-system/finalize",
"uid": "3e15ccdc-a665-45bf-99e3-a2cd9d7937f2",
"resourceVersion": "1078875",
"creationTimestamp": "2019-11-15T07:06:06Z",
"deletionTimestamp": "2019-11-18T06:19:15Z",
"annotations": {
"kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"name\":\"cattle-system\"}}\n"
}
},
"spec": {

},
"status": {
"phase": "Terminating",
"conditions": [
{
"type": "NamespaceDeletionDiscoveryFailure",
"status": "True",
"lastTransitionTime": "2019-11-18T06:19:20Z",
"reason": "DiscoveryFailed",
"message": "Discovery failed for some groups, 1 failing: unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: the server is currently unable to handle the request"
},
{
"type": "NamespaceDeletionGroupVersionParsingFailure",
"status": "False",
"lastTransitionTime": "2019-11-18T06:19:21Z",
"reason": "ParsedGroupVersions",
"message": "All legacy kube types successfully parsed"
},
{
"type": "NamespaceDeletionContentFailure",
"status": "False",
"lastTransitionTime": "2019-11-18T06:19:21Z",
"reason": "ContentDeleted",
"message": "All content successfully deleted"
}
]
}
}