From 40c602965cc7a2ac21462389ae49d206d9f28e18 Mon Sep 17 00:00:00 2001 From: Zihan Xiao <98075925+zihanxiao23@users.noreply.github.com> Date: Mon, 9 Dec 2024 17:34:29 -0500 Subject: [PATCH] Create deployment.yaml --- k8s/deployment.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 k8s/deployment.yaml diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml new file mode 100644 index 0000000..7d9eaca --- /dev/null +++ b/k8s/deployment.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: microservice + labels: + app: microservice +spec: + replicas: 3 # Number of instances to deploy + selector: + matchLabels: + app: microservice + template: + metadata: + labels: + app: microservice + spec: + containers: + - name: microservice + image: microservice:latest + ports: + - containerPort: 5000 + resources: # Optional: Limit resources per pod + limits: + memory: "256Mi" + cpu: "500m" + env: # Optional: Add environment variables if needed + - name: PYSPARK_PYTHON + value: "python3"