Skip to content

Instantly share code, notes, and snippets.

@willbeason
Created April 25, 2019 20:23
Show Gist options
  • Save willbeason/ba52f1d01f4494c398aa64ca8e0f09e9 to your computer and use it in GitHub Desktop.
Save willbeason/ba52f1d01f4494c398aa64ca8e0f09e9 to your computer and use it in GitHub Desktop.
~$ kubectl edit ns delete-me --v=9
I0425 13:11:13.132076 131153 loader.go:359] Config loaded from file [home]/.kube/config
I0425 13:11:13.140314 131153 round_trippers.go:419] curl -k -v -XGET -H "Accept: application/json" -H "User-Agent: kubectl/v1.14.1 (linux/amd64) kubernetes/b739410" 'https://[host]/api/v1/namespaces/delete-me'
I0425 13:11:13.300048 131153 round_trippers.go:438] GET https://[host]/api/v1/namespaces/delete-me 200 OK in 159 milliseconds
I0425 13:11:13.300086 131153 round_trippers.go:444] Response Headers:
I0425 13:11:13.300097 131153 round_trippers.go:447] Audit-Id: 9d158540-223f-4461-a2bd-284bb21e7666
I0425 13:11:13.300112 131153 round_trippers.go:447] Content-Type: application/json
I0425 13:11:13.300124 131153 round_trippers.go:447] Content-Length: 552
I0425 13:11:13.300136 131153 round_trippers.go:447] Date: Thu, 25 Apr 2019 20:11:13 GMT
I0425 13:11:13.300200 131153 request.go:942] Response Body: {"kind":"Namespace","apiVersion":"v1","metadata":{"name":"delete-me","selfLink":"/api/v1/namespaces/delete-me","uid":"0df02f91-6782-11e9-8beb-42010a800137","resourceVersion":"26831","creationTimestamp":"2019-04-25T17:46:28Z","deletionTimestamp":"2019-04-25T17:46:31Z","annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"name\":\"delete-me\"},\"spec\":{\"finalizers\":[]}}\n"}},"spec":{"finalizers":["foregroundDeletion"]},"status":{"phase":"Terminating"}}
I0425 13:11:13.301098 131153 editor.go:128] Opening file with editor [vi /tmp/kubectl-edit-zmkkd.yaml]
I0425 13:11:41.889775 131153 editoptions.go:289] User edited:
# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: v1
kind: Namespace
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"v1","kind":"Namespace","metadata":{"annotations":{},"name":"delete-me"},"spec":{"finalizers":[]}}
creationTimestamp: "2019-04-25T17:46:28Z"
deletionTimestamp: "2019-04-25T17:46:31Z"
name: delete-me
resourceVersion: "26831"
selfLink: /api/v1/namespaces/delete-me
uid: 0df02f91-6782-11e9-8beb-42010a800137
spec:
finalizers:
status:
phase: Terminating
I0425 13:11:41.891328 131153 round_trippers.go:419] curl -k -v -XGET -H "User-Agent: kubectl/v1.14.1 (linux/amd64) kubernetes/b739410" -H "Accept: application/com.github.proto-openapi.spec.v2@v1.0+protobuf" 'https://[host]/openapi/v2?timeout=32s'
I0425 13:11:41.936781 131153 round_trippers.go:438] GET https://[host]/openapi/v2?timeout=32s 200 OK in 45 milliseconds
I0425 13:11:41.936813 131153 round_trippers.go:444] Response Headers:
I0425 13:11:41.936826 131153 round_trippers.go:447] Audit-Id: a885a250-1d4a-42dc-9ba9-4cf8e9fb05b4
I0425 13:11:41.936838 131153 round_trippers.go:447] Content-Type: application/octet-stream
I0425 13:11:41.936850 131153 round_trippers.go:447] Date: Thu, 25 Apr 2019 20:11:41 GMT
I0425 13:11:41.936863 131153 round_trippers.go:447] Etag: "170B2CB41AC90B757978F7F435281DB5D67F934762A85DCBB5A021F79B6FE63E6AA07A6F34D00598D8825C12366FBE89923FD7D14DB1C21D6D0E5F4CE76007E4"
I0425 13:11:41.936876 131153 round_trippers.go:447] Last-Modified: Thu, 25 Apr 2019 19:57:51 GMT
I0425 13:11:41.936889 131153 round_trippers.go:447] Vary: Accept-Encoding
I0425 13:11:41.936900 131153 round_trippers.go:447] Vary: Accept
I0425 13:11:41.936911 131153 round_trippers.go:447] Accept-Ranges: bytes
I0425 13:11:41.936922 131153 round_trippers.go:447] X-Varied-Accept: application/com.github.proto-openapi.spec.v2@v1.0+protobuf
I0425 13:11:41.936934 131153 round_trippers.go:447] X-From-Cache: 1
I0425 13:11:42.024965 131153 request.go:940] Response Body:
00000000 0a 03 32 2e 30 12 15 0a 0a 4b 75 62 65 72 6e 65 |..2.0....Kuberne|
00000010 74 65 73 12 07 76 31 2e 31 32 2e 37 42 cd e1 76 |tes..v1.12.7B..v|
00000020 12 ca 02 0a 05 2f 61 70 69 2f 12 c0 02 12 bd 02 |...../api/......|
00000030 0a 04 63 6f 72 65 1a 1a 67 65 74 20 61 76 61 69 |..core..get avai|
00000040 6c 61 62 6c 65 20 41 50 49 20 76 65 72 73 69 6f |lable API versio|
00000050 6e 73 2a 12 67 65 74 43 6f 72 65 41 50 49 56 65 |ns*.getCoreAPIVe|
00000060 72 73 69 6f 6e 73 32 10 61 70 70 6c 69 63 61 74 |rsions2.applicat|
00000070 69 6f 6e 2f 6a 73 6f 6e 32 10 61 70 70 6c 69 63 |ion/json2.applic|
00000080 61 74 69 6f 6e 2f 79 61 6d 6c 32 23 61 70 70 6c |ation/yaml2#appl|
00000090 69 63 61 74 69 6f 6e 2f 76 6e 64 2e 6b 75 62 65 |ication/vnd.kube|
000000a0 72 6e 65 74 65 73 2e 70 72 6f 74 6f 62 75 66 3a |rnetes.protobuf:|
000000b0 10 61 70 70 6c 69 63 61 74 69 6f 6e 2f 6a 73 6f |.application/jso|
000000c0 6e 3a 10 61 70 70 6c 69 63 61 74 69 6f 6e 2f 79 |n:.application/y|
000000d0 61 6d 6c 3a 23 61 70 70 6c 69 63 61 74 69 6f 6e |aml:#application|
000000e0 2f 76 6e 64 2e 6b 75 62 65 72 6e 65 74 65 73 2e |/vnd.kubernetes.|
000000f0 70 72 6f 74 6f 62 75 66 4a 6c 0a 51 0a 03 32 30 |protobufJl.Q..20|
00000100 30 12 4a 0a 48 0a 02 4f 4b 12 42 0a 40 0a 3e 23 |0.J.H..OK.B.@.>#|
00000110 2f 64 65 66 69 6e 69 74 69 6f 6e 73 2f 69 6f 2e |/definitions/io.|
00000120 6b 38 73 2e 61 70 69 6d 61 63 68 69 6e 65 72 79 |k8s.apimachinery|
00000130 2e 70 6b 67 2e 61 70 69 73 2e 6d 65 74 61 2e 76 |.pkg.apis.meta.v|
00000140 31 2e 41 50 49 56 65 72 73 69 6f 6e 73 0a 17 0a |1.APIVersions...|
00000150 03 34 30 31 12 10 0a 0e 0a 0c 55 6e 61 75 74 68 |.401......Unauth|
00000160 6f 72 69 7a 65 64 52 05 68 74 74 70 73 12 d4 02 |orizedR.https...|
00000170 0a 08 2f 61 70 69 2f 76 31 2f 12 c7 02 12 c4 02 |../api/v1/......|
00000180 0a 07 63 6f 72 65 5f 76 31 1a 17 67 65 74 20 61 |..core_v1..get a|
00000190 76 61 69 6c 61 62 6c 65 20 72 65 73 6f 75 72 63 |vailable resourc|
000001a0 65 73 2a 15 67 65 74 43 6f 72 65 56 31 41 50 49 |es*.getCoreV1API|
000001b0 52 65 73 6f 75 72 63 65 73 32 10 61 70 70 6c 69 |Resources2.appli|
000001c0 63 61 74 69 6f 6e 2f 6a 73 6f 6e 32 10 61 70 70 |cation/json2.app|
000001d0 6c 69 63 61 74 69 6f 6e 2f 79 61 6d 6c 32 23 61 |lication/yaml2#a|
000001e0 70 70 6c 69 63 61 74 69 6f 6e 2f 76 6e 64 2e 6b |pplication/vnd.k|
000001f0 75 62 65 72 6e 65 74 65 73 2e 70 72 6f 74 6f 62 |ubernetes.protob|
00000200 75 66 3a 10 61 70 70 6c 69 63 61 74 69 6f 6e 2f |uf:.application/|
00000210 6a 73 6f 6e 3a 10 61 70 70 6c 69 63 61 74 69 6f |json:.applicatio|
00000220 6e 2f 79 61 6d 6c 3a 23 61 70 70 6c 69 63 61 74 |n/yaml:#applicat|
00000230 69 6f 6e 2f 76 6e 64 2e 6b 75 62 65 72 6e 65 74 |ion/vnd.kubernet|
00000240 65 73 2e 70 72 6f 74 6f 62 75 66 4a 70 0a 55 0a |es.protobufJp.U.|
00000250 03 32 30 30 12 4e 0a 4c 0a 02 4f 4b 12 46 0a 44 |.200.N.L..OK.F.D|
00000260 0a 42 23 2f 64 65 66 69 6e 69 74 69 6f 6e 73 2f |.B#/definitions/|
00000270 69 6f 2e 6b 38 73 2e 61 70 69 6d 61 63 68 69 6e |io.k8s.apimachin|
00000280 65 72 79 2e 70 6b 67 2e 61 70 69 73 2e 6d 65 74 |ery.pkg.apis.met|
00000290 61 2e 76 31 2e 41 50 49 52 65 73 6f 75 72 63 65 |a.v1.APIResource|
000002a0 4c 69 73 74 0a 17 0a 03 34 30 31 12 10 0a 0e 0a |List....401.....|
000002b0 0c 55 6e 61 75 74 68 6f 72 69 7a 65 64 52 05 68 |.UnauthorizedR.h|
000002c0 74 74 70 73 12 e0 22 0a 19 2f 61 70 69 2f 76 31 |ttps.."../api/v1|
000002d0 2f 63 6f 6d 70 6f 6e 65 6e 74 73 74 61 74 75 73 |/componentstatus|
000002e0 65 73 12 c2 22 12 c7 03 0a 07 63 6f 72 65 5f 76 |es..".....core_v|
000002f0 31 1a 24 6c 69 73 74 20 6f 62 6a 65 63 74 73 20 |1.$list objects |
00000300 6f 66 20 6b 69 6e 64 20 43 6f 6d 70 6f 6e 65 6e |of kind Componen|
00000310 74 53 74 61 74 75 73 2a 19 6c 69 73 74 43 6f 72 |tStatus*.listCor|
00000320 65 56 31 43 6f 6d 70 6f 6e 65 6e 74 53 74 61 74 |eV1ComponentStat|
00000330 75 73 32 10 61 70 70 6c 69 63 61 74 69 6f 6e 2f |us2.application/|
00000340 6a 73 6f 6e 32 10 61 70 70 6c 69 63 61 74 69 6f |json2.applicatio|
00000350 6e 2f 79 61 6d 6c 32 23 61 70 70 6c 69 63 61 74 |n/yaml2#applicat|
00000360 69 6f 6e 2f 76 6e 64 2e 6b 75 62 65 72 6e 65 74 |ion/vnd.kubernet|
00000370 65 73 2e 70 72 6f 74 6f 62 75 66 32 1d 61 70 70 |es.protobuf2.app|
00000380 6c 69 63 61 74 69 6f 6e 2f 6a 73 6f 6e 3b 73 74 |lication/json;st|
00000390 72 65 61 6d 3d 77 61 74 63 68 32 30 61 70 70 6c |ream=watch20appl|
000003a0 69 63 61 74 69 6f 6e 2f 76 6e 64 2e 6b 75 62 65 |ication/vnd.kube|
000003b0 72 6e 65 74 65 73 2e 70 72 6f 74 6f 62 75 66 3b |rnetes.protobuf;|
000003c0 73 74 72 65 61 6d 3d 77 61 74 63 68 3a 03 2a 2f |stream=watch:.*/|
000003d0 2a 4a 62 0a 47 0a 03 32 30 30 12 40 0a 3e 0a 02 |*Jb.G..200.@.>..|
000003e0 4f 4b 12 38 0a 36 0a 34 23 2f 64 65 66 69 6e 69 |OK.8.6.4#/defini|
000003f0 74 69 6f 6e 73 2f 69 6f 2e 6b 38 73 2e 61 70 69 |tions/io.k8s.api|
00000400 2e 63 6f 72 65 2e 76 31 2e 43 6f 6d 70 6f 6e 65 |.core.v1.Compone|
00000410 6e 74 53 74 61 74 75 73 4c 69 73 74 0a 17 0a 03 |ntStatusList....|
00000420 34 30 31 12 10 0a 0e 0a 0c 55 6e 61 75 74 68 6f |401......Unautho|
00000430 72 69 7a 65 64 52 05 68 74 74 70 73 6a 1e 0a 13 |rizedR.httpsj...|
00000440 78 2d 6b 75 62 65 72 6e 65 74 65 73 2d 61 63 74 |x-kubernetes-act|
00000450 69 6f 6e 12 07 12 05 6c 69 73 74 0a 6a 51 0a 1f |ion....list.jQ..|
00000460 78 2d 6b 75 62 65 72 6e 65 74 65 73 2d 67 72 6f |x-kubernetes-gro|
00000470 75 70 2d 76 65 72 73 69 6f 6e 2d 6b 69 6e 64 12 |up-version-kind.|
00000480 2e 12 2c 67 72 6f 75 70 3a 20 22 22 0a 6b 69 6e |..,group: "".kin|
00000490 64 3a 20 43 6f 6d 70 6f 6e 65 6e 74 53 74 61 74 |d: ComponentStat|
000004a0 75 73 0a 76 65 72 73 69 6f 6e 3a 20 76 31 0a 4a |us.version: v1.J|
000004b0 ef 09 0a ec 09 12 e9 09 1a e6 09 12 05 71 75 65 |.............que|
000004c0 72 79 1a c7 09 54 68 65 20 63 6f 6e 74 69 6e 75 |ry...The continu|
000004d0 65 20 6f 70 74 69 6f 6e 20 73 68 6f 75 6c 64 20 |e option should |
000004e0 62 65 20 73 65 74 20 77 68 65 6e 20 72 65 74 72 |be set when retr|
000004f0 69 65 76 69 6e 67 20 6d 6f 72 65 20 72 65 73 75 |ieving more resu|
00000500 6c 74 73 20 66 72 6f 6d 20 74 68 65 20 73 65 72 |lts from the ser|
00000510 76 65 72 2e 20 53 69 6e 63 65 20 74 68 69 73 20 |ver. Since this |
00000520 76 61 6c 75 65 20 69 73 20 73 65 72 76 65 72 20 |value is server |
00000530 64 65 66 69 6e 65 64 2c 20 63 6c 69 65 6e 74 73 |defined, clients|
00000540 20 6d 61 79 20 6f 6e 6c 79 20 75 73 65 20 74 68 | may only use th|
00000550 65 20 63 6f 6e 74 69 6e 75 65 20 76 61 6c 75 65 |e continue value|
00000560 20 66 72 6f 6d 20 61 20 70 72 65 76 69 6f 75 73 | from a previous|
00000570 20 71 75 65 72 79 20 72 65 73 75 6c 74 20 77 69 | query result wi|
00000580 74 68 20 69 64 65 6e 74 69 63 61 6c 20 71 75 65 |th identical que|
00000590 72 79 20 70 61 72 61 6d 65 74 65 72 73 20 28 65 |ry parameters (e|
000005a0 78 63 65 70 74 20 66 6f 72 20 74 68 65 20 76 61 |xcept for the va|
000005b0 6c 75 65 20 6f 66 20 63 6f 6e 74 69 6e 75 65 29 |lue of continue)|
000005c0 20 61 6e 64 20 74 68 65 20 73 65 72 76 65 72 20 | and the server |
000005d0 6d 61 79 20 72 65 6a 65 63 74 20 61 20 63 6f 6e |may reject a con|
000005e0 74 69 6e 75 65 20 76 61 6c 75 65 20 69 74 20 64 |tinue value it d|
000005f0 6f 65 73 20 6e 6f 74 20 72 65 63 6f 67 6e 69 7a |oes not recogniz|
00000600 65 2e 20 49 66 20 74 68 65 20 73 70 65 63 69 66 |e. If the specif|
00000610 69 65 64 20 63 6f 6e 74 69 6e 75 65 20 76 61 6c |ied continue val|
00000620 75 65 20 69 73 20 6e 6f 20 6c 6f 6e 67 65 72 20 |ue is no longer |
00000630 76 61 6c 69 64 20 77 68 65 74 68 65 72 20 64 75 |valid whether du|
00000640 65 20 74 6f 20 65 78 70 69 72 61 74 69 6f 6e 20 |e to expiration |
00000650 28 67 65 6e 65 72 61 6c 6c 79 20 66 69 76 65 20 |(generally five |
00000660 74 6f 20 66 69 66 74 65 65 6e 20 6d 69 6e 75 74 |to fifteen minut|
00000670 65 73 29 20 6f 72 20 61 20 63 6f 6e 66 69 67 75 |es) or a configu|
00000680 72 61 74 69 6f 6e 20 63 68 61 6e 67 65 20 6f 6e |ration change on|
00000690 20 74 68 65 20 73 65 72 76 65 72 2c 20 74 68 65 | the server, the|
000006a0 20 73 65 72 76 65 72 20 77 69 6c 6c 20 72 65 73 | server will res|
000006b0 70 6f 6e 64 20 77 69 74 68 20 61 20 34 31 30 20 |pond with a 410 |
000006c0 52 65 73 6f 75 72 63 65 45 78 70 69 72 65 64 20 |ResourceExpired |
000006d0 65 72 72 6f 72 20 74 6f 67 65 74 68 65 72 20 77 |error together w|
000006e0 69 74 68 20 61 20 63 6f 6e 74 69 6e 75 65 20 74 |ith a continue t|
000006f0 6f 6b 65 6e 2e 20 49 66 20 74 68 65 20 63 6c 69 |oken. If the cli|
00000700 65 6e 74 20 6e 65 65 64 73 20 61 20 63 6f 6e 73 |ent needs a cons|
00000710 69 73 74 65 6e 74 20 6c 69 73 74 2c 20 69 74 20 |istent list, it |
00000720 6d 75 73 74 20 72 65 73 74 61 72 74 20 74 68 65 |must restart the|
00000730 69 72 20 6c 69 73 74 20 77 69 74 68 6f 75 74 20 |ir list without |
00000740 74 68 65 20 63 6f 6e 74 69 6e 75 65 20 66 69 65 |the continue fie|
00000750 6c 64 2e 20 4f 74 68 65 72 77 69 73 65 2c 20 74 |ld. Otherwise, t|
00000760 68 65 20 63 6c 69 65 6e 74 20 6d 61 79 20 73 65 |he client may se|
00000770 6e 64 20 61 6e 6f 74 68 65 72 20 6c 69 73 74 20 |nd another list |
00000780 72 65 71 75 65 73 74 20 77 69 74 68 20 74 68 65 |request with the|
00000790 20 74 6f 6b 65 6e 20 72 65 63 65 69 76 65 64 20 | token received |
000007a0 77 69 74 68 20 74 68 65 20 34 31 30 20 65 72 72 |with the 410 err|
000007b0 6f 72 2c 20 74 68 65 20 73 65 72 76 65 72 20 77 |or, the server w|
000007c0 69 6c 6c 20 72 65 73 70 6f 6e 64 20 77 69 74 68 |ill respond with|
000007d0 20 61 20 6c 69 73 74 20 73 74 61 72 74 69 6e 67 | a list starting|
000007e0 20 66 72 6f 6d 20 74 68 65 20 6e 65 78 74 20 6b | from the next k|
000007f0 65 79 2c 20 62 75 74 20 66 72 6f 6d 20 74 68 65 |ey, but from the|
00000800 20 6c 61 74 65 73 74 20 73 6e 61 70 73 68 6f 74 | latest snapshot|
00000810 2c 20 77 68 69 63 68 20 69 73 20 69 6e [truncated 12734118 chars]
I0425 13:11:42.059813 131153 request.go:942] Request Body: {"spec":{"finalizers":null}}
I0425 13:11:42.059906 131153 round_trippers.go:419] curl -k -v -XPATCH -H "Content-Type: application/strategic-merge-patch+json" -H "Accept: application/json" -H "User-Agent: kubectl/v1.14.1 (linux/amd64) kubernetes/b739410" 'https://[host]/api/v1/namespaces/delete-me'
I0425 13:11:42.101305 131153 round_trippers.go:438] PATCH https://[host]/api/v1/namespaces/delete-me 200 OK in 41 milliseconds
I0425 13:11:42.101366 131153 round_trippers.go:444] Response Headers:
I0425 13:11:42.101382 131153 round_trippers.go:447] Content-Type: application/json
I0425 13:11:42.101395 131153 round_trippers.go:447] Content-Length: 552
I0425 13:11:42.101406 131153 round_trippers.go:447] Date: Thu, 25 Apr 2019 20:11:42 GMT
I0425 13:11:42.101417 131153 round_trippers.go:447] Audit-Id: 0e7e0640-f5e1-41a4-8ecf-3ff91ec22307
I0425 13:11:42.101458 131153 request.go:942] Response Body: {"kind":"Namespace","apiVersion":"v1","metadata":{"name":"delete-me","selfLink":"/api/v1/namespaces/delete-me","uid":"0df02f91-6782-11e9-8beb-42010a800137","resourceVersion":"26831","creationTimestamp":"2019-04-25T17:46:28Z","deletionTimestamp":"2019-04-25T17:46:31Z","annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"name\":\"delete-me\"},\"spec\":{\"finalizers\":[]}}\n"}},"spec":{"finalizers":["foregroundDeletion"]},"status":{"phase":"Terminating"}}
namespace/delete-me edited
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment