Skip to content

Instantly share code, notes, and snippets.

@thdotnet
Created October 29, 2021 15:32
Show Gist options
  • Save thdotnet/f18f5706fd1dba414ce5ba7059fb47db to your computer and use it in GitHub Desktop.
Save thdotnet/f18f5706fd1dba414ce5ba7059fb47db to your computer and use it in GitHub Desktop.
deployment.yml
apiVersion: apps/v1
# The type of workload we are creating
kind: Deployment
metadata:
# Name of deployment - Required
name: aks-web-app-deployment
spec:
replicas: 2
selector:
matchLabels:
app: aks-web-app
# Pod template which decribes the pod you want to deploy
template:
metadata:
# Used to logically group pods together
labels:
app: aks-web-app
# Specific details about the containers in the Pod
spec:
containers:
- name: aks-web-app-container
# Docker Hub image to use
image: nginx
# Define ports to expose
ports:
- containerPort: 80
# Reference name of port
name: http
resources:
# Minimum amount of resources we want
requests:
cpu: 100m
memory: 128Mi
# Maximum amount of resources we want
limits:
cpu: 250m
memory: 256Mi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment