Skip to content

Commit 4b19615

Browse files
authored
Merge pull request #25767 from shevelevs/shevelevs/probes-http-headers
Fix examples for http probe headers
2 parents fa2c834 + 7e4e475 commit 4b19615

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

content/en/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -389,24 +389,32 @@ You can override the default headers by defining `.httpHeaders` for the probe; f
389389

390390
```yaml
391391
livenessProbe:
392-
httpHeaders:
393-
Accept: application/json
392+
httpGet:
393+
httpHeaders:
394+
- name: Accept
395+
value: application/json
394396
395397
startupProbe:
396-
httpHeaders:
397-
User-Agent: MyUserAgent
398+
httpGet:
399+
httpHeaders:
400+
- name: User-Agent
401+
value: MyUserAgent
398402
```
399403

400404
You can also remove these two headers by defining them with an empty value.
401405

402406
```yaml
403407
livenessProbe:
404-
httpHeaders:
405-
Accept: ""
408+
httpGet:
409+
httpHeaders:
410+
- name: Accept
411+
value: ""
406412
407413
startupProbe:
408-
httpHeaders:
409-
User-Agent: ""
414+
httpGet:
415+
httpHeaders:
416+
- name: User-Agent
417+
value: ""
410418
```
411419

412420
### TCP probes

0 commit comments

Comments
 (0)