We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc7f4e9 commit 63c9905Copy full SHA for 63c9905
2 files changed
app/Dockerfile
@@ -0,0 +1,9 @@
1
+FROM python:3.7
2
+
3
+RUN mkdir /app
4
+WORKDIR /app
5
+ADD . /app/
6
+RUN pip install -r requirements.txt
7
8
+EXPOSE 5000
9
+CMD ["python", "/app/main.py"]
app/deployment.yaml
@@ -0,0 +1,34 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: hello-python-service
+spec:
+ selector:
+ app: hello-python
+ ports:
+ - protocol: "TCP"
10
+ port: 6000
11
+ targetPort: 5000
12
+ type: LoadBalancer
13
14
+---
15
+apiVersion: apps/v1
16
+kind: Deployment
17
18
+ name: hello-python
19
20
21
+ matchLabels:
22
23
+ replicas: 4
24
+ template:
25
+ metadata:
26
+ labels:
27
28
+ spec:
29
+ containers:
30
+ - name: hello-python
31
+ image: hello-python:latest
32
+ imagePullPolicy: Never
33
34
+ - containerPort: 5000
0 commit comments