Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: 🚀 Adding Kubernetes deployment file #3

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,9 @@ npm run dev
nvm use
npm run test
```

### How to deploy

```bash
kubectl apply -f kube/deployment -n <your_desired_namespace>
```
50 changes: 50 additions & 0 deletions kube/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Azure Base deployment
---
apiVersion: v1
kind: Service
metadata:
name: find-face-app-internal
annotations:
# If you want to expose the service to the internet just remove the internal LB
service.beta.kubernetes.io/azure-load-balancer-internal: "true"
spec:
type: LoadBalancer
loadBalancerIP: 1.2.3.4 # Replace with the value that suits your subnet
ports:
- port: 5000
selector:
app: find-face-app
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: find-face-app
labels:
app: find-face-app
spec:
replicas: 1
selector:
matchLabels:
app: find-face-app
version: v1
template:
metadata:
labels:
app: find-face-app
version: v1
spec:
nodeSelector:
kubernetes.io/os: linux
containers:
- name: find-face-app
image: ezequielmr94/findface-multi-mock
imagePullPolicy: Always
ports:
- containerPort: 5000
resources:
requests:
cpu: 50m
memory: 100M
limits:
cpu: 100m
memory: 150M