Skip to content

Instantly share code, notes, and snippets.

@cmendible
Last active April 27, 2019 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cmendible/8ce226b5996c92a020fe1761ff7325aa to your computer and use it in GitHub Desktop.
Save cmendible/8ce226b5996c92a020fe1761ff7325aa to your computer and use it in GitHub Desktop.
Kubernetes deployment for the Global Azure Bootcamp 2019 Science Lab

Kubernetes deployment for the Global Azure Bootcamp 2019 Science Lab

This deployment file will attempt to deploy 3 replicas of the container used in the Global Azure Bootcamp 2019 Science Lab.

Just run:

kubectl apply -f ./gab-2019-science-lab.yaml

Please remember to replace the values in the file and note that, if you want to run more replicas, the container has some agressive cpu and memory requirement that you should consider. Otherwise you will end up with pods in pending state.

apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: gab-2019-science-lab
spec:
replicas: 3
template:
metadata:
labels:
app: gab-2019-science-lab
spec:
containers:
- name: sciencelab2019
image: globalazurebootcamp/sciencelab2019:latest
env:
- name: BatchClient__Email
value: "<your email here>"
- name: BatchClient__Fullname
value: "<your fullname here>"
- name: BatchClient__TeamName
value: "<your team name here>"
- name: BatchClient__CompanyName
value: "<your company here>"
- name: BatchClient__CountryCode
value: "<your country code here>"
- name: BatchClient__LabKeyCode
value: "<your lab key code here>"
resources:
limits:
cpu: "1.5"
memory: 2Gi
requests:
cpu: 1
memory: "1.5Gi"
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: gab-2019-science-lab
spec:
type: LoadBalancer
ports:
- name:
port: 80
targetPort: 80
selector:
app: gab-2019-science-lab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment