Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
api-deployment.yml
apiVersion: apps/v1
kind: Deployment
metadata:
name: aksapi
namespace: aks-learning
labels:
run: aksapi
spec:
replicas: 1
selector:
matchLabels:
run: aksapi
template:
metadata:
labels:
run: aksapi
spec:
initContainers:
- name: init-myservice
image: rahulsahay19/sqlclient
imagePullPolicy: IfNotPresent
command:
- "sh"
- "-c"
- "/opt/mssql-tools/bin/sqlcmd -S db-deployment -U sa -P AKSLearn(!) -d master -i initialize-db.sql"
containers:
- name: aksapi
image: rahulsahay19/aksapi
imagePullPolicy: IfNotPresent
env:
- name: ASPNETCORE_URLS
value: http://0.0.0.0:8081
- name: ConnectionStrings__DefaultConnection
value: "Data Source=db-deployment;Initial Catalog=AKSLearnDB;User Id=SA;Password=AKSLearn(!);MultipleActiveResultSets=True"
ports:
- containerPort: 8081
protocol: TCP
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.