Skip to content

Commit 05d962d

Browse files
authored
add yaml from /en (#19881)
1 parent 95d83bb commit 05d962d

11 files changed

+174
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
labels:
5+
app: snowflake
6+
name: snowflake
7+
spec:
8+
replicas: 2
9+
selector:
10+
matchLabels:
11+
app: snowflake
12+
template:
13+
metadata:
14+
labels:
15+
app: snowflake
16+
spec:
17+
containers:
18+
- image: k8s.gcr.io/serve_hostname
19+
imagePullPolicy: Always
20+
name: snowflake
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: php-apache
5+
spec:
6+
selector:
7+
matchLabels:
8+
run: php-apache
9+
replicas: 1
10+
template:
11+
metadata:
12+
labels:
13+
run: php-apache
14+
spec:
15+
containers:
16+
- name: php-apache
17+
image: k8s.gcr.io/hpa-example
18+
ports:
19+
- containerPort: 80
20+
resources:
21+
limits:
22+
cpu: 500m
23+
requests:
24+
cpu: 200m
25+
26+
---
27+
28+
apiVersion: v1
29+
kind: Service
30+
metadata:
31+
name: php-apache
32+
labels:
33+
run: php-apache
34+
spec:
35+
ports:
36+
- port: 80
37+
selector:
38+
run: php-apache
39+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: nginx
5+
spec:
6+
affinity:
7+
nodeAffinity:
8+
preferredDuringSchedulingIgnoredDuringExecution:
9+
- weight: 1
10+
preference:
11+
matchExpressions:
12+
- key: disktype
13+
operator: In
14+
values:
15+
- ssd
16+
containers:
17+
- name: nginx
18+
image: nginx
19+
imagePullPolicy: IfNotPresent
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: nginx
5+
spec:
6+
affinity:
7+
nodeAffinity:
8+
requiredDuringSchedulingIgnoredDuringExecution:
9+
nodeSelectorTerms:
10+
- matchExpressions:
11+
- key: disktype
12+
operator: In
13+
values:
14+
- ssd
15+
containers:
16+
- name: nginx
17+
image: nginx
18+
imagePullPolicy: IfNotPresent
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: nginx
5+
labels:
6+
env: test
7+
spec:
8+
containers:
9+
- name: nginx
10+
image: nginx
11+
imagePullPolicy: IfNotPresent
12+
tolerations:
13+
- key: "example-key"
14+
operator: "Exists"
15+
effect: "NoSchedule"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
apiVersion: networking.k8s.io/v1
3+
kind: NetworkPolicy
4+
metadata:
5+
name: allow-all-egress
6+
spec:
7+
podSelector: {}
8+
egress:
9+
- {}
10+
policyTypes:
11+
- Egress
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
apiVersion: networking.k8s.io/v1
3+
kind: NetworkPolicy
4+
metadata:
5+
name: allow-all-ingress
6+
spec:
7+
podSelector: {}
8+
ingress:
9+
- {}
10+
policyTypes:
11+
- Ingress
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
apiVersion: networking.k8s.io/v1
3+
kind: NetworkPolicy
4+
metadata:
5+
name: default-deny-all
6+
spec:
7+
podSelector: {}
8+
policyTypes:
9+
- Ingress
10+
- Egress
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
apiVersion: networking.k8s.io/v1
3+
kind: NetworkPolicy
4+
metadata:
5+
name: default-deny-egress
6+
spec:
7+
podSelector: {}
8+
policyTypes:
9+
- Egress
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
apiVersion: networking.k8s.io/v1
3+
kind: NetworkPolicy
4+
metadata:
5+
name: default-deny-ingress
6+
spec:
7+
podSelector: {}
8+
policyTypes:
9+
- Ingress

0 commit comments

Comments
 (0)