From e148e6846ed1d273ee7ae43b57a6783d5ad34485 Mon Sep 17 00:00:00 2001 From: lucaslccs Date: Sun, 27 May 2018 00:33:58 +0000 Subject: [PATCH] Create azure-vote-ilb-all-in-one-redis.yaml Azure Voting App with Azure Load Balancer and INTERNAL IP *requires Master and Node on same Subnet Network This sample creates a multi-container application in INTERNAL subnet from an Kubernetes Cluster including ACS, ACSe and AKS. The application interface has been built using Python / Flask. The data component is using Redis. To walk through a complete experience where this code is packaged into container images, uploaded to Azure Container Registry, and then run in and AKS cluster, see the AKS tutorials. --- azure-vote-ilb-all-in-one-redis.yaml | 66 ++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 azure-vote-ilb-all-in-one-redis.yaml diff --git a/azure-vote-ilb-all-in-one-redis.yaml b/azure-vote-ilb-all-in-one-redis.yaml new file mode 100644 index 0000000000..1f8ef12b43 --- /dev/null +++ b/azure-vote-ilb-all-in-one-redis.yaml @@ -0,0 +1,66 @@ +apiVersion: apps/v1beta1 +kind: Deployment +metadata: + name: azure-vote-back-ilb + namespace: default +spec: + replicas: 1 + template: + metadata: + labels: + app: azure-vote-back-ilb + spec: + containers: + - name: azure-vote-back-ilb + image: redis + ports: + - containerPort: 6379 + name: redis +--- +apiVersion: v1 +kind: Service +metadata: + name: azure-vote-back-ilb + namespace: default +spec: + ports: + - port: 6379 + selector: + app: azure-vote-back-ilb +--- +apiVersion: apps/v1beta1 +kind: Deployment +metadata: + name: azure-vote-front-ilb + namespace: default +spec: + replicas: 3 + template: + metadata: + labels: + app: azure-vote-front-ilb + spec: + containers: + - name: azure-vote-front-ilb + image: microsoft/azure-vote-front:v1 + ports: + - containerPort: 80 + env: + - name: REDIS + value: "azure-vote-back-ilb" +--- +apiVersion: v1 +kind: Service +metadata: + name: azure-vote-front-ilb + namespace: default + annotations: + service.beta.kubernetes.io/azure-load-balancer-internal: "true" +spec: + selector: + app: azure-vote-front-ilb + ports: + - protocol: TCP + port: 80 + targetPort: 80 + type: LoadBalancer