diff --git a/admin-service/azure-deploy-service.yaml b/admin-service/azure-deploy-service.yaml new file mode 100644 index 00000000..231a8562 --- /dev/null +++ b/admin-service/azure-deploy-service.yaml @@ -0,0 +1,35 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: adminservice +spec: + replicas: 1 + selector: + matchLabels: + app: adminservice + template: + metadata: + labels: + app: adminservice + spec: + containers: + - name: adminservice + image: ntdemocontainerregistry.azurecr.io/IMAGE:TAG + imagePullPolicy: Always + ports: + - name: http + containerPort: 8080 + protocol: TCP +--- +apiVersion: v1 +kind: Service +metadata: + name: adminservice +spec: + selector: + app: adminservice + ports: + - protocol: TCP + port: 80 + targetPort: 8080 + type: LoadBalancer diff --git a/az-svc-deployment.sh b/az-svc-deployment.sh index 341bc0c9..6790d2b3 100644 --- a/az-svc-deployment.sh +++ b/az-svc-deployment.sh @@ -29,7 +29,7 @@ echo "---------------set docker image for kustomize-------------------" ./kustomize edit set image ntdemocontainerregistry.azurecr.io/IMAGE:TAG=ntdemocontainerregistry.azurecr.io/"$SERVICE_NAME":"$GITHUB_SHA" echo "---------------deploy through kubectl------------------" # deploy through kubectl -./kustomize build . | kubectl apply -f - +./kustomize build . | kubectl apply -f -azure-deploy-service.yaml kubectl rollout status deployment/"$DEPLOYMENT_NAME" kubectl get services -o wide echo "-------------$SERVICE_NAME deployed on $CLUSTER_NAME----------"