-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy patheks-sample-linux-deployment.yaml
More file actions
46 lines (46 loc) · 1.12 KB
/
eks-sample-linux-deployment.yaml
File metadata and controls
46 lines (46 loc) · 1.12 KB
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
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: eks-sample-linux-deployment
namespace: rpc
labels:
app: eks-sample-linux-app
spec:
replicas: 2
selector:
matchLabels:
app: eks-sample-linux-app
template:
metadata:
labels:
app: eks-sample-linux-app
spec:
volumes:
- name: task-pv-storage
persistentVolumeClaim:
claimName: rpc-app-pvc
containers:
- name: nginx
image: public.ecr.aws/nginx/nginx:1.23
env:
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
volumeMounts:
- mountPath: "/log"
subPathExpr: $(NODE_NAME)/$(POD_NAME)
name: task-pv-storage
ports:
- name: http
containerPort: 80
imagePullPolicy: IfNotPresent
nodeSelector:
kubernetes.io/os: linux