-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeployment.yaml
More file actions
31 lines (31 loc) · 1.03 KB
/
deployment.yaml
File metadata and controls
31 lines (31 loc) · 1.03 KB
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-deployment
spec:
replicas: 2
selector:
matchLabels:
app: my-app
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app: my-app
spec:
containers:
- image: myapi:latest
# https://medium.com/bb-tutorials-and-thoughts/how-to-use-own-local-doker-images-with-minikube-2c1ed0b0968
# указыаает на то, что образы нужно брать только из локального registry. В продакшене никогда не использовать
imagePullPolicy: Never
name: myapi
ports:
- containerPort: 8080
hostAliases:
- ip: "192.168.65.2" # The IP of localhost from MiniKube
hostnames:
- postgres.local