Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions content/docs/troubleshooting/webhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -693,13 +693,24 @@ In another shell session, check that you can reach the webhook:

```sh
curl -vsS --resolve cert-manager-webhook.cert-manager.svc:10250:127.0.0.1 \
-H "Content-Type: application/json" \
--service-name cert-manager-webhook-ca \
--cacert <(kubectl -n cert-manager get secret cert-manager-webhook-ca -ojsonpath='{.data.ca\.crt}' | base64 -d) \
https://cert-manager-webhook.cert-manager.svc:10250/validate 2>&1 -d@- <<'EOF' | sed '/^* /d; /bytes data]$/d; s/> //; s/< //'
{"kind":"AdmissionReview","apiVersion":"admission.k8s.io/v1","request":{"requestKind":{"group":"cert-manager.io","version":"v1","kind":"Certificate"},"requestResource":{"group":"cert-manager.io","version":"v1","resource":"certificates"},"name":"foo","namespace":"default","operation":"CREATE","object":{"apiVersion":"cert-manager.io/v1","kind":"Certificate","spec":{"dnsNames":["foo"],"issuerRef":{"group":"cert-manager.io","kind":"Issuer","name":"letsencrypt"},"secretName":"foo","usages":["digital signature"]}}}}
EOF
```

> ℹ️ if the `-H "Content-Type: application/json"` is omitted from the command above, you are likely

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: can you start the sentence with a capital letter

Suggested change
> ℹ️ if the `-H "Content-Type: application/json"` is omitted from the command above, you are likely
> ℹ️ If the `-H "Content-Type: application/json"` is omitted from the command above, you are likely

> to see a response like:
>
> ```json
> {"response":{"uid":"","allowed":false,"status":{"metadata":{},"message":"contentType=application/x-www-form-urlencoded, expected application/json","code":400}}}
> ```
>
> This is because the the default content type for curl is `application/x-www-form-urlencoded` but
> it is irrelevant to the troubleshooting effort.

The happy output looks like this:

```http
Expand Down