forked from Edu-TCS-DevOps-Aug21/dcpwe-javaapp-repo1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aws-cicd-k8s-dep.yaml
59 lines (54 loc) · 1.18 KB
/
aws-cicd-k8s-dep.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
apiVersion: v1
kind: Namespace
metadata:
name: aws-cicd
---
apiVersion: v1
data:
.dockerconfigjson: eyJhdXRocyI6eyJodHRwczovL2luZGV4LmRvY2tlci5pby92MS8iOnsidXNlcm5hbWUiOiJiaGFnaTk5IiwicGFzc3dvcmQiOiJkY2tyX3BhdF9tLXhGNDRnUjFiN0xUMTdLc2xtd2dtUHVKZEUiLCJlbWFpbCI6ImJoYWdpLnJhbWFoYWxsYUBnbWFpbC5jb20iLCJhdXRoIjoiWW1oaFoyazVPVHBrWTJ0eVgzQmhkRjl0TFhoR05EUm5VakZpTjB4VU1UZExjMnh0ZDJkdFVIVktaRVU9In19fQ==
kind: Secret
metadata:
name: regcred
namespace: aws-cicd
type: kubernetes.io/dockerconfigjson
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: aws-cicd-deployment
namespace: aws-cicd
labels:
app: aws-cicd-app
spec:
replicas: 3
selector:
matchLabels:
app: aws-cicd-app
template:
metadata:
labels:
app: aws-cicd-app
spec:
containers:
- name: aws-cicd-container
image: devopsedu/employee
ports:
- containerPort: 8888
imagePullSecrets:
- name: regcred
---
apiVersion: v1
kind: Service
metadata:
name: aws-cicd-np-service
namespace: aws-cicd
labels:
app: aws-cicd-app
spec:
selector:
app: aws-cicd-app
type: NodePort
ports:
- nodePort: 31029
port: 8888
targetPort: 8888