Skip to content

Commit

Permalink
Create deployment.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
zihanxiao23 authored Dec 9, 2024
1 parent 317a2bc commit 40c6029
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions k8s/deployment.yaml
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 40c6029

Please sign in to comment.