Skip to content

Instantly share code, notes, and snippets.

@willbeason
Created April 25, 2019 21:04
Show Gist options
  • Save willbeason/be90dac4c9d1b2a26b8c0a10ac1e50dc to your computer and use it in GitHub Desktop.
Save willbeason/be90dac4c9d1b2a26b8c0a10ac1e50dc to your computer and use it in GitHub Desktop.
~$ cat ns.json
{
"kind": "Namespace",
"apiVersion": "v1",
"metadata": {
"name": "delete-me",
"selfLink": "/api/v1/namespaces/delete-me",
"uid": "5a770e86-679b-11e9-b402-0242de00befd",
"resourceVersion": "1225",
"creationTimestamp": "2019-04-25T20:47:34Z",
"deletionTimestamp": "2019-04-25T20:48:40Z",
"annotations": {
"kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"name\":\"delete-me\"},\"spec\":{\"finalizers\":[\"foregroundDeletion\"]}}\n"
}
},
"spec": {
"finalizers": [
]
},
"status": {
"phase": "Terminating"
}
}
~$ curl -k -H "Content-Type: application/json" -X POST --data-binary @ns.json http://127.0.0.1:8005/api/v1/namespaces/delete-me/finalize
Skippy Security Tip: It seems that you are using the flags: --insecure or -k. These flags disable SSL verification and could allow someone to tamper with your connection.
Suggestion: Use curl without the flags: --insecure or -k
More info: http://go/roole/downloaders_nossl.md
Do you still want to execute this command? [y/n]y
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {
},
"status": "Failure",
"message": "the server does not allow this method on the requested resource",
"reason": "MethodNotAllowed",
"details": {
},
"code": 405
}~$
~$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment