Skip to content

Instantly share code, notes, and snippets.

@likamrat
Created January 20, 2021 19:27
Show Gist options
  • Save likamrat/603b6e3e5bfc5f51aa7dc095acbe596a to your computer and use it in GitHub Desktop.
Save likamrat/603b6e3e5bfc5f51aa7dc095acbe596a to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: mydrive-user-deployment
namespace: api
labels:
deploy: mydrive-user
spec:
replicas: 2
selector:
matchLabels:
app: mydrive-user
template:
metadata:
labels:
app: mydrive-user
spec:
containers:
- image: "{{registry}}.azurecr.io/userprofile:1.0"
imagePullPolicy: Always
name: mydrive-user
livenessProbe:
httpGet:
path: /api/user/healthcheck
port: 80
initialDelaySeconds: 10
periodSeconds: 30
readinessProbe:
httpGet:
path: /api/user/healthcheck
port: 80
initialDelaySeconds: 5
periodSeconds: 5
ports:
- containerPort: 80
name: http
protocol: TCP
- containerPort: 443
name: https
protocol: TCP
envFrom:
- secretRef:
name: sql
---
apiVersion: v1
kind: Service
metadata:
name: userprofile
namespace: api
spec:
type: ClusterIP
selector:
app: mydrive-user
ports:
- protocol: TCP
name: mydrive-user-http
port: 80
targetPort: 80
- protocol: TCP
name: mydrive-user-https
port: 443
targetPort: 443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment