Skip to content

Commit

Permalink
add kubernetes requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
Chandru-21 committed Jun 25, 2024
1 parent 0ccb085 commit e724232
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,13 @@ jobs:
echo "Pushing image to ECR..."
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"
- name: Update kube config
run: aws eks update-kubeconfig --name mlops

- name: Deploy to EKS
run: |
kubectl apply -f deployment.yml
kubectl apply -f service.yml
22 changes: 22 additions & 0 deletions deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: mlops
labels:
app: mlops
spec:
replicas: 1
selector:
matchLabels:
app: mlops
template:
metadata:
labels:
app: mlops
spec:
containers:
- name: mlops
image: 637423514597.dkr.ecr.us-east-2.amazonaws.com/mlops:latest
imagePullPolicy: Always
ports:
- containerPort: 8005
12 changes: 12 additions & 0 deletions service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: mlops
spec:
selector:
app: mlops
ports:
- protocol: TCP
port: 80
targetPort: 8005
type: LoadBalancer

0 comments on commit e724232

Please sign in to comment.