Skip to content

Commit 0314a73

Browse files
committed
Kubernetes: Add whoami app deployment manifest files
Signed-off-by: NotHarshhaa <[email protected]>
1 parent 1ed0e14 commit 0314a73

5 files changed

+98
-0
lines changed

Diff for: whoami/whoami-deployment.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: whoami-deployment
5+
spec:
6+
replicas: 2
7+
selector:
8+
matchLabels:
9+
app: whoami
10+
template:
11+
metadata:
12+
labels:
13+
app: whoami
14+
spec:
15+
containers:
16+
- name: whoami-container
17+
image: containous/whoami
18+

Diff for: whoami/whoami-ingress.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# changed
2+
# apiVersion: networking.k8s.io/v1
3+
# kind: Ingress
4+
# metadata:
5+
# name: whoami-ingress
6+
# annotations:
7+
# kubernetes.io/ingress.class: nginx
8+
# # traefik.ingress.kubernetes.io/rule-type: "PathPrefixStrip"
9+
# spec:
10+
# rules:
11+
# - host: csky08
12+
# http:
13+
# paths:
14+
# - path: /
15+
# backend:
16+
# serviceName: whoami-service
17+
# servicePort: 80
18+
19+
20+
apiVersion: networking.k8s.io/v1
21+
kind: Ingress
22+
metadata:
23+
name: whoami-ingress
24+
annotations:
25+
ingressclass.kubernetes.io/is-default-class: "true"
26+
spec:
27+
ingressClassName: nginx
28+
rules:
29+
- host: csky08
30+
http:
31+
paths:
32+
- path: /
33+
pathType: Prefix
34+
backend:
35+
service:
36+
name: whoami-service
37+
port:
38+
number: 80
39+

Diff for: whoami/whoami-service-ClusterIP.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: whoami-service
5+
spec:
6+
ports:
7+
- name: http
8+
targetPort: 80
9+
port: 80
10+
selector:
11+
app: whoami
12+
type: ClusterIP
13+

Diff for: whoami/whoami-service-loadbalancer.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
#name: whoami-service-loadbalancer #changed
5+
name: whoami-service
6+
spec:
7+
ports:
8+
- name: http
9+
targetPort: 80
10+
port: 80
11+
selector:
12+
app: whoami
13+
type: LoadBalancer
14+

Diff for: whoami/whoami-service-nodeport.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
#name: whoami-service-nodeport #changed
5+
name: whoami-service
6+
spec:
7+
ports:
8+
- name: http
9+
targetPort: 80
10+
port: 80
11+
selector:
12+
app: whoami
13+
type: NodePort
14+

0 commit comments

Comments
 (0)