-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.dev.yaml
55 lines (51 loc) · 1.19 KB
/
deploy.dev.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: shop-api
spec:
selector:
matchLabels:
app: shop-api
replicas: 1
template: # template for the pods
metadata:
name: shop-api
labels:
app: shop-api
spec:
containers:
- name: shop-api
env:
- name: ASPNETCORE_ENVIRONMENT
value: "Development"
image: shop-api
resources:
requests:
memory: 100Mi
cpu: 50m
# pull image from remote server ?
imagePullPolicy: Never
readinessProbe:
httpGet:
path: /WeatherForecast
port: 5000
---
apiVersion: v1
kind: Service
metadata:
name: shop-api
spec:
# This defines which pods are going to be represented by this Service
# The service becomes a network endpoint for either other services
# or maybe external users to connect to (eg browser)
# minikube start --extra-config=apiserver.service-node-port-range=80-30000,
# port 80 can be used as well
selector:
app: shop-api
ports:
- name: http
port: 5000
targetPort: 5000
# default port range: 30000-32767
nodePort: 30001
type: NodePort