-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathazure-deployment.yaml
More file actions
33 lines (33 loc) · 820 Bytes
/
azure-deployment.yaml
File metadata and controls
33 lines (33 loc) · 820 Bytes
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
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
name: spring-boot-deployment
spec:
selector:
matchLabels:
app: spring-boot-app-sample-1
replicas: 2 # tells deployment to run 2 pods matching the template
template:
metadata:
labels:
app: spring-boot-app-sample-1
spec:
containers:
- name: spring-boot-app-sample-1
image: iamvickyav/spring-h2-app:v1
ports:
- containerPort: 8081
---
# https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service
kind: Service
apiVersion: v1
metadata:
name: spring-boot-service
spec:
selector:
app: spring-boot-app-sample-1
ports:
- protocol: TCP
port: 8080
targetPort: 8081
type: LoadBalancer