-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaufgabe2.yaml
88 lines (88 loc) · 1.64 KB
/
aufgabe2.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
apiVersion: apps/v1
kind: Deployment
metadata:
name: fun-ibw-deployment
labels:
app: fun-ibw
spec:
replicas: 1
selector:
matchLabels:
app: test-ibw
template:
metadata:
labels:
app: fun-ibw
spec:
securityContext:
runAsNonRoot: true
runAsUser: 11000
runAsGroup: 11000
fsGroup: 11000
containers:
- name: fun-ibw
image: quay.io/onzack/ibwdailyfun:1.0.0
securityContext:
privileged: false
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
ports:
- containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: fun-ibw-svc
labels:
app: fun-ibw
spec:
type: ClusterIP
ports:
- port: 9090
name: http
selector:
app: fun-ibw
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: fun-ibw-ingress
spec:
rules:
- host: 127.0.0.1.fun-ibw.sslip.io
http:
paths:
- path: /fun
pathType: Prefix
backend:
service:
name: fun-ibw-svc
port:
number: 8080
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: fun-ibw
spec:
podSelector:
matchLabels:
app: fun-ibw
policyTypes:
- Ingress
- Egress
ingress: []
egress:
- to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
podSelector:
matchLabels:
app.kubernetes.io/instance: traefik-kube-system
app.kubernetes.io/name: traefik
ports:
- protocol: TCP
port: 8080