Skip to content

Commit 0be8d82

Browse files
authored
Merge pull request #36466 from flant/ru-docs_manage-deployment
[ru] Add RU localization - manage-deployment.md
2 parents 13ea6b9 + 340e974 commit 0be8d82

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2042
-2
lines changed

content/ru/docs/concepts/cluster-administration/manage-deployment.md

Lines changed: 452 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
labels:
5+
app: cassandra
6+
name: cassandra
7+
spec:
8+
clusterIP: None
9+
ports:
10+
- port: 9042
11+
selector:
12+
app: cassandra
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
apiVersion: apps/v1
2+
kind: StatefulSet
3+
metadata:
4+
name: cassandra
5+
labels:
6+
app: cassandra
7+
spec:
8+
serviceName: cassandra
9+
replicas: 3
10+
selector:
11+
matchLabels:
12+
app: cassandra
13+
template:
14+
metadata:
15+
labels:
16+
app: cassandra
17+
spec:
18+
terminationGracePeriodSeconds: 1800
19+
containers:
20+
- name: cassandra
21+
image: gcr.io/google-samples/cassandra:v13
22+
imagePullPolicy: Always
23+
ports:
24+
- containerPort: 7000
25+
name: intra-node
26+
- containerPort: 7001
27+
name: tls-intra-node
28+
- containerPort: 7199
29+
name: jmx
30+
- containerPort: 9042
31+
name: cql
32+
resources:
33+
limits:
34+
cpu: "500m"
35+
memory: 1Gi
36+
requests:
37+
cpu: "500m"
38+
memory: 1Gi
39+
securityContext:
40+
capabilities:
41+
add:
42+
- IPC_LOCK
43+
lifecycle:
44+
preStop:
45+
exec:
46+
command:
47+
- /bin/sh
48+
- -c
49+
- nodetool drain
50+
env:
51+
- name: MAX_HEAP_SIZE
52+
value: 512M
53+
- name: HEAP_NEWSIZE
54+
value: 100M
55+
- name: CASSANDRA_SEEDS
56+
value: "cassandra-0.cassandra.default.svc.cluster.local"
57+
- name: CASSANDRA_CLUSTER_NAME
58+
value: "K8Demo"
59+
- name: CASSANDRA_DC
60+
value: "DC1-K8Demo"
61+
- name: CASSANDRA_RACK
62+
value: "Rack1-K8Demo"
63+
- name: POD_IP
64+
valueFrom:
65+
fieldRef:
66+
fieldPath: status.podIP
67+
readinessProbe:
68+
exec:
69+
command:
70+
- /bin/bash
71+
- -c
72+
- /ready-probe.sh
73+
initialDelaySeconds: 15
74+
timeoutSeconds: 5
75+
# These volume mounts are persistent. They are like inline claims,
76+
# but not exactly because the names need to match exactly one of
77+
# the stateful pod volumes.
78+
volumeMounts:
79+
- name: cassandra-data
80+
mountPath: /cassandra_data
81+
# These are converted to volume claims by the controller
82+
# and mounted at the paths mentioned above.
83+
# do not use these in production until ssd GCEPersistentDisk or other ssd pd
84+
volumeClaimTemplates:
85+
- metadata:
86+
name: cassandra-data
87+
spec:
88+
accessModes: [ "ReadWriteOnce" ]
89+
storageClassName: fast
90+
resources:
91+
requests:
92+
storage: 1Gi
93+
---
94+
kind: StorageClass
95+
apiVersion: storage.k8s.io/v1
96+
metadata:
97+
name: fast
98+
provisioner: k8s.io/minikube-hostpath
99+
parameters:
100+
type: pd-ssd
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: patch-demo
5+
spec:
6+
replicas: 2
7+
selector:
8+
matchLabels:
9+
app: nginx
10+
template:
11+
metadata:
12+
labels:
13+
app: nginx
14+
spec:
15+
containers:
16+
- name: patch-demo-ctr
17+
image: nginx
18+
tolerations:
19+
- effect: NoSchedule
20+
key: dedicated
21+
value: test-team
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: retainkeys-demo
5+
spec:
6+
selector:
7+
matchLabels:
8+
app: nginx
9+
strategy:
10+
rollingUpdate:
11+
maxSurge: 30%
12+
template:
13+
metadata:
14+
labels:
15+
app: nginx
16+
spec:
17+
containers:
18+
- name: retainkeys-demo-ctr
19+
image: nginx
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: nginx-deployment
5+
spec:
6+
selector:
7+
matchLabels:
8+
app: nginx
9+
replicas: 4 # Update the replicas from 2 to 4
10+
template:
11+
metadata:
12+
labels:
13+
app: nginx
14+
spec:
15+
containers:
16+
- name: nginx
17+
image: nginx:1.14.2
18+
ports:
19+
- containerPort: 80
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: nginx-deployment
5+
spec:
6+
selector:
7+
matchLabels:
8+
app: nginx
9+
replicas: 2
10+
template:
11+
metadata:
12+
labels:
13+
app: nginx
14+
spec:
15+
containers:
16+
- name: nginx
17+
image: nginx:1.16.1 # Update the version of nginx from 1.14.2 to 1.16.1
18+
ports:
19+
- containerPort: 80

content/ru/examples/application/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
apiVersion: apps/v1 # до версии 1.9.0 нужно использовать apps/v1beta2
1+
apiVersion: apps/v1
22
kind: Deployment
33
metadata:
44
name: nginx-deployment
55
spec:
66
selector:
77
matchLabels:
88
app: nginx
9-
replicas: 2 # запускает 2 пода, созданных по шаблону
9+
replicas: 2 # tells deployment to run 2 pods matching the template
1010
template:
1111
metadata:
1212
labels:
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# SOURCE: https://cloud.google.com/kubernetes-engine/docs/tutorials/guestbook
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
name: frontend
6+
spec:
7+
replicas: 3
8+
selector:
9+
matchLabels:
10+
app: guestbook
11+
tier: frontend
12+
template:
13+
metadata:
14+
labels:
15+
app: guestbook
16+
tier: frontend
17+
spec:
18+
containers:
19+
- name: php-redis
20+
image: gcr.io/google_samples/gb-frontend:v5
21+
env:
22+
- name: GET_HOSTS_FROM
23+
value: "dns"
24+
resources:
25+
requests:
26+
cpu: 100m
27+
memory: 100Mi
28+
ports:
29+
- containerPort: 80
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# SOURCE: https://cloud.google.com/kubernetes-engine/docs/tutorials/guestbook
2+
apiVersion: v1
3+
kind: Service
4+
metadata:
5+
name: frontend
6+
labels:
7+
app: guestbook
8+
tier: frontend
9+
spec:
10+
# if your cluster supports it, uncomment the following to automatically create
11+
# an external load-balanced IP for the frontend service.
12+
# type: LoadBalancer
13+
#type: LoadBalancer
14+
ports:
15+
# the port that this service should serve on
16+
- port: 80
17+
selector:
18+
app: guestbook
19+
tier: frontend

0 commit comments

Comments
 (0)