Skip to content

Commit 0118f3c

Browse files
Kalyan Reddy DaidaKalyan Reddy Daida
authored andcommitted
Welcome to Stack Simplify
1 parent e846a29 commit 0118f3c

File tree

4 files changed

+77
-0
lines changed

4 files changed

+77
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: backend-restapp
5+
labels:
6+
app: backend-restapp
7+
tier: backend
8+
spec:
9+
replicas: 3
10+
selector:
11+
matchLabels:
12+
app: backend-restapp
13+
template:
14+
metadata:
15+
labels:
16+
app: backend-restapp
17+
tier: backend
18+
spec:
19+
containers:
20+
- name: backend-restapp
21+
image: stacksimplify/kube-helloworld:1.0.0
22+
ports:
23+
- containerPort: 8080
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: my-backend-service ## VERY VERY IMPORTANT - NGINX PROXYPASS needs this name
5+
labels:
6+
app: backend-restapp
7+
tier: backend
8+
spec:
9+
#type: Cluster IP is a default service
10+
selector:
11+
app: backend-restapp
12+
ports:
13+
- name: http
14+
port: 8080 # ClusterIp Service Port
15+
targetPort: 8080 # Container Port
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: frontend-nginxapp
5+
labels:
6+
app: frontend-nginxapp
7+
tier: frontend
8+
spec:
9+
replicas: 3
10+
selector:
11+
matchLabels:
12+
app: frontend-nginxapp
13+
template:
14+
metadata:
15+
labels:
16+
app: frontend-nginxapp
17+
tier: frontend
18+
spec:
19+
containers:
20+
- name: frontend-nginxapp
21+
image: stacksimplify/kube-frontend-nginx:1.0.0
22+
ports:
23+
- containerPort: 80
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: frontend-nginxapp-nodeport-service
5+
labels:
6+
app: frontend-nginxapp
7+
tier: frontend
8+
spec:
9+
type: NodePort
10+
selector:
11+
app: frontend-nginxapp
12+
ports:
13+
- name: http
14+
port: 80
15+
targetPort: 80
16+
nodePort: 31234

0 commit comments

Comments
 (0)