This repository has been archived by the owner on Feb 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfib.yaml
88 lines (88 loc) · 1.57 KB
/
fib.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: v1
kind: Namespace
metadata:
labels:
kubernetes.io/metadata.name: fibonacci
name: fibonacci
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: fibonacci
name: fibonacci
namespace: fibonacci
spec:
selector:
matchLabels:
app: fibonacci
template:
metadata:
labels:
app: fibonacci
spec:
# runtimeClassName: gvisor
securityContext:
runAsUser: 1000
runAsGroup: 3000
# appArmorProfile:
# type: Localhost
# localhostProfile: k8s-apparmor-example-for-fibonacci
containers:
- image: fibonacci:0
name: fibonacci
ports:
- containerPort: 8000
protocol: TCP
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
readOnlyRootFilesystem: true
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: fibonacci
namespace: fibonacci
spec:
podSelector: {}
policyTypes:
- Egress
- Ingress
egress:
- {}
ingress:
- ports:
- protocol: TCP
port: 8000
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: fibonacci
namespace: fibonacci
spec:
maxReplicas: 10
minReplicas: 1
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: fibonacci
targetCPUUtilizationPercentage: 50
---
apiVersion: v1
kind: Service
metadata:
labels:
app: fibonacci
name: fibonacci
namespace: fibonacci
spec:
ports:
- port: 80
protocol: TCP
targetPort: 8000
selector:
app: fibonacci
type: LoadBalancer