File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM python:3.7
1+ FROM python:3.7-alpine
22
33RUN mkdir /app
44WORKDIR /app
5- ADD . /app/
5+ ADD ./app .
66RUN pip install -r requirements.txt
77
88EXPOSE 5000
Original file line number Diff line number Diff line change 1- apiVersion : v1
2- kind : Service
3- metadata :
4- name : hello-python-service
5- spec :
6- selector :
7- app : hello-python
8- ports :
9- - protocol : " TCP"
10- port : 6000
11- targetPort : 5000
12- type : LoadBalancer
13-
14-
15- ---
16- apiVersion : apps/v1beta1
1+ apiVersion : apps/v1
172kind : Deployment
183metadata :
194 name : hello-python
205spec :
21- replicas : 4
6+ replicas : 3
7+ selector :
8+ matchLabels :
9+ app : hello-python
2210 template :
2311 metadata :
2412 labels :
2513 app : hello-python
2614 spec :
2715 containers :
2816 - name : hello-python
29- image : hello-python:latest
30- imagePullPolicy : Never
17+ image : odytrice/hello-python:latest
3118 ports :
3219 - containerPort : 5000
20+ resources :
21+ requests :
22+ cpu : 50m
23+ memory : 50Mi
24+ limits :
25+ cpu : 100m
26+ memory : 150Mi
27+
28+
Original file line number Diff line number Diff line change 1+ apiVersion : networking.k8s.io/v1beta1
2+ kind : Ingress
3+ metadata :
4+ name : hello-python-ingress
5+ spec :
6+ # tls:
7+ # - host: hello-python.dev.io
8+ # secretName: dev-io-tls
9+ rules :
10+ - host : hello-python.dev.io
11+ http :
12+ paths :
13+ - backend :
14+ serviceName : hello-python
15+ servicePort : 5000
Original file line number Diff line number Diff line change 1+ namespace : hello-python
2+ resources :
3+ - deployment.yaml
4+ - service.yaml
5+ - ingress.yaml
Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : Service
3+ metadata :
4+ name : hello-python
5+ spec :
6+ selector :
7+ app : hello-python
8+ ports :
9+ - protocol : " TCP"
10+ port : 5000
You can’t perform that action at this time.
0 commit comments