Skip to content

Commit c6f76c6

Browse files
committed
configure-liveness-readiness-startup-probes RU
1 parent 58811df commit c6f76c6

File tree

6 files changed

+418
-0
lines changed

6 files changed

+418
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: "Настройка Pod'ов и контейнеров"
3+
weight: 20
4+
---
5+

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

Lines changed: 341 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
labels:
5+
test: liveness
6+
name: liveness-exec
7+
spec:
8+
containers:
9+
- name: liveness
10+
image: k8s.gcr.io/busybox
11+
args:
12+
- /bin/sh
13+
- -c
14+
- touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600
15+
livenessProbe:
16+
exec:
17+
command:
18+
- cat
19+
- /tmp/healthy
20+
initialDelaySeconds: 5
21+
periodSeconds: 5
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
labels:
5+
test: liveness
6+
name: liveness-http
7+
spec:
8+
containers:
9+
- name: liveness
10+
image: k8s.gcr.io/liveness
11+
args:
12+
- /server
13+
livenessProbe:
14+
httpGet:
15+
path: /healthz
16+
port: 8080
17+
httpHeaders:
18+
- name: Custom-Header
19+
value: Awesome
20+
initialDelaySeconds: 3
21+
periodSeconds: 3
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: goproxy
5+
labels:
6+
app: goproxy
7+
spec:
8+
containers:
9+
- name: goproxy
10+
image: k8s.gcr.io/goproxy:0.1
11+
ports:
12+
- containerPort: 8080
13+
readinessProbe:
14+
tcpSocket:
15+
port: 8080
16+
initialDelaySeconds: 5
17+
periodSeconds: 10
18+
livenessProbe:
19+
tcpSocket:
20+
port: 8080
21+
initialDelaySeconds: 15
22+
periodSeconds: 20
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Вам нужен Kubernetes кластер и инструмент командной строки kubectl должен быть настроен
2+
на связь с вашим кластером. Если у вас ещё нет кластера,
3+
вы можете создать, его используя
4+
[Minikube](/docs/setup/learning-environment/minikube/),
5+
или вы можете использовать одну из песочниц Kubernetes:
6+
7+
* [Katacoda](https://www.katacoda.com/courses/kubernetes/playground)
8+
* [Play with Kubernetes](http://labs.play-with-k8s.com/)

0 commit comments

Comments
 (0)