forked from rmkanda/sample-api-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathk8s.yaml
38 lines (38 loc) · 728 Bytes
/
k8s.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
kind: Service
apiVersion: v1
metadata:
name: hostname-service
spec:
type: NodePort
selector:
app: sample-api
ports:
- nodePort: 30163
port: 8080
targetPort: 8080
---
apiVersion: v1
kind: Pod
metadata:
name: sample-api
labels:
app: sample-api
spec:
containers:
- name: sample-api
image: rmkanda/sample-api-service:latest
resources:
requests:
memory: "256Mi"
cpu: "250m"
limits:
memory: "512Mi"
cpu: "500m"
securityContext:
runAsNonRoot: true
runAsUser: 10001
allowPrivilegeEscalation: false
capabilities:
drop:
- "ALL"
add: ["NET_ADMIN", "SYS_TIME"]