forked from HoussemDellai/angular-app-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeployment.local.yaml
More file actions
34 lines (34 loc) · 758 Bytes
/
deployment.local.yaml
File metadata and controls
34 lines (34 loc) · 758 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
34
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
name: angular-deployment
spec:
selector:
matchLabels:
app: angular
replicas: 5 # tells deployment to run 2 pods matching the template
template:
metadata:
labels:
app: angular
spec:
containers:
- name: angular
image: houssemdocker/angular-app:v1
ports:
- containerPort: 80
---
# https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service
kind: Service
apiVersion: v1
metadata:
name: angular-service
spec:
selector:
app: angular
ports:
- protocol: TCP
port: 80
targetPort: 80
nodePort: 31000
type: NodePort