diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..4225fc8 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +README.md +Dokerfile \ No newline at end of file diff --git a/pythondeployment.yaml b/pythondeployment.yaml new file mode 100644 index 0000000..2b9a852 --- /dev/null +++ b/pythondeployment.yaml @@ -0,0 +1,42 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: pythonappdeployment +spec: + revisionHistoryLimit: 10 + replicas: 2 + strategy: + type: Recreate + selector: + matchLabels: + app: pythonapp + template: + metadata: + name: pythonapppod + labels: + app: pythonapp + spec: + containers: + - name: pythonapp + image: kohlihub/python:1 + ports: + - containerPort: 5000 + resources: + requests: + cpu: 100m + memory: 200Mi + limits: + cpu: 300m + memory: 300Mi +--- +apiVersion: v1 +kind: Service +metadata: + name: pythonappsvc +spec: + selector: + app: pythonapp + type: NodePort + ports: + - port: 80 + targetPort: 5000