added kubernetes deployment
This commit is contained in:
parent
68c95f4150
commit
cc97de3e89
38
delpoyment.yaml
Normal file
38
delpoyment.yaml
Normal file
@ -0,0 +1,38 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: simple-blog-api
|
||||
labels:
|
||||
app: python
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: python
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxSurge: 1
|
||||
maxUnavailable: 33%
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: python
|
||||
spec:
|
||||
containers:
|
||||
- name: python
|
||||
image: inkletblot/simple-blog-api:<VERSION>
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /posts
|
||||
port: 5000
|
||||
initialDelaySeconds: 2
|
||||
periodSeconds: 2
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /posts
|
||||
port: 5000
|
||||
initialDelaySeconds: 2
|
||||
periodSeconds: 2
|
||||
Reference in New Issue
Block a user