-
Notifications
You must be signed in to change notification settings - Fork 920
Expand file tree
/
Copy pathk8s-deployment.yaml
More file actions
36 lines (36 loc) · 831 Bytes
/
k8s-deployment.yaml
File metadata and controls
36 lines (36 loc) · 831 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
35
36
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-python-app-deployment
namespace: python-app-ns # Namespace where the deployment will be created
spec:
replicas: 3
selector:
matchLabels:
app: python-app
template:
metadata:
labels:
app: python-app
spec:
containers:
- name: my-python-app
image: 211223789150.dkr.ecr.us-east-1.amazonaws.com/coachak/my-docker-repo:${BUILD_NUMBER}
imagePullPolicy: Always
ports:
- containerPort: 5000
# service type loadbalancer
---
apiVersion: v1
kind: Service
metadata:
name: python-app-svc
namespace: python-app-ns # Namespace where the deployment will be created
spec:
selector:
app: python-app
ports:
- protocol: TCP
port: 80
targetPort: 5000
type: ClusterIP