Skip to content

Commit 843ee21

Browse files
authored
Merge pull request #22346 from tengqm/zh-fix-examples
[zh] fix examples test
2 parents 059fb9e + 5f10c21 commit 843ee21

11 files changed

+369
-70
lines changed

content/zh/examples/admin/sched/my-scheduler.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@ roleRef:
1717
name: system:kube-scheduler
1818
apiGroup: rbac.authorization.k8s.io
1919
---
20+
apiVersion: rbac.authorization.k8s.io/v1
21+
kind: ClusterRoleBinding
22+
metadata:
23+
name: my-scheduler-as-volume-scheduler
24+
subjects:
25+
- kind: ServiceAccount
26+
name: my-scheduler
27+
namespace: kube-system
28+
roleRef:
29+
kind: ClusterRole
30+
name: system:volume-scheduler
31+
apiGroup: rbac.authorization.k8s.io
32+
---
2033
apiVersion: apps/v1
2134
kind: Deployment
2235
metadata:
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
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: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
apiVersion: apps/v1
2+
kind: DaemonSet
3+
metadata:
4+
name: fluentd-elasticsearch
5+
namespace: kube-system
6+
labels:
7+
k8s-app: fluentd-logging
8+
spec:
9+
selector:
10+
matchLabels:
11+
name: fluentd-elasticsearch
12+
updateStrategy:
13+
type: RollingUpdate
14+
rollingUpdate:
15+
maxUnavailable: 1
16+
template:
17+
metadata:
18+
labels:
19+
name: fluentd-elasticsearch
20+
spec:
21+
tolerations:
22+
# this toleration is to have the daemonset runnable on master nodes
23+
# remove it if your masters can't run pods
24+
- key: node-role.kubernetes.io/master
25+
effect: NoSchedule
26+
containers:
27+
- name: fluentd-elasticsearch
28+
image: quay.io/fluentd_elasticsearch/fluentd:v2.5.2
29+
resources:
30+
limits:
31+
memory: 200Mi
32+
requests:
33+
cpu: 100m
34+
memory: 200Mi
35+
volumeMounts:
36+
- name: varlog
37+
mountPath: /var/log
38+
- name: varlibdockercontainers
39+
mountPath: /var/lib/docker/containers
40+
readOnly: true
41+
terminationGracePeriodSeconds: 30
42+
volumes:
43+
- name: varlog
44+
hostPath:
45+
path: /var/log
46+
- name: varlibdockercontainers
47+
hostPath:
48+
path: /var/lib/docker/containers
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
apiVersion: apps/v1
2+
kind: DaemonSet
3+
metadata:
4+
name: fluentd-elasticsearch
5+
namespace: kube-system
6+
labels:
7+
k8s-app: fluentd-logging
8+
spec:
9+
selector:
10+
matchLabels:
11+
name: fluentd-elasticsearch
12+
updateStrategy:
13+
type: RollingUpdate
14+
rollingUpdate:
15+
maxUnavailable: 1
16+
template:
17+
metadata:
18+
labels:
19+
name: fluentd-elasticsearch
20+
spec:
21+
tolerations:
22+
# this toleration is to have the daemonset runnable on master nodes
23+
# remove it if your masters can't run pods
24+
- key: node-role.kubernetes.io/master
25+
effect: NoSchedule
26+
containers:
27+
- name: fluentd-elasticsearch
28+
image: quay.io/fluentd_elasticsearch/fluentd:v2.5.2
29+
volumeMounts:
30+
- name: varlog
31+
mountPath: /var/log
32+
- name: varlibdockercontainers
33+
mountPath: /var/lib/docker/containers
34+
readOnly: true
35+
terminationGracePeriodSeconds: 30
36+
volumes:
37+
- name: varlog
38+
hostPath:
39+
path: /var/log
40+
- name: varlibdockercontainers
41+
hostPath:
42+
path: /var/lib/docker/containers

0 commit comments

Comments
 (0)