Skip to content

Instantly share code, notes, and snippets.

@PatrickLang
Last active July 13, 2018 22:30
Show Gist options
  • Save PatrickLang/0df013d20d32eb98bc57456c4f73461a to your computer and use it in GitHub Desktop.
Save PatrickLang/0df013d20d32eb98bc57456c4f73461a to your computer and use it in GitHub Desktop.
IIS sample with health check
apiVersion: apps/v1
kind: Deployment
metadata:
name: iis-1709
labels:
app: iis-1709
spec:
replicas: 1
template:
metadata:
name: iis-1709
labels:
app: iis-1709
spec:
containers:
- name: iis
image: microsoft/iis:windowsservercore-1709
ports:
- containerPort: 80
livenessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 120
periodSeconds: 10
readinessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 60
periodSeconds: 5
nodeSelector:
"beta.kubernetes.io/os": windows
selector:
matchLabels:
app: iis-1709
---
apiVersion: v1
kind: Service
metadata:
name: iis
spec:
type: LoadBalancer
ports:
- protocol: TCP
port: 80
selector:
app: iis-1709
apiVersion: apps/v1
kind: Deployment
metadata:
name: iis-1803
labels:
app: iis-1803
spec:
replicas: 1
template:
metadata:
name: iis-1803
labels:
app: iis-1803
spec:
containers:
- name: iis
image: microsoft/iis:windowsservercore-1803
ports:
- containerPort: 80
livenessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 120
periodSeconds: 10
readinessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 60
periodSeconds: 5
nodeSelector:
"beta.kubernetes.io/os": windows
selector:
matchLabels:
app: iis-1803
---
apiVersion: v1
kind: Service
metadata:
name: iis
spec:
type: LoadBalancer
ports:
- protocol: TCP
port: 80
selector:
app: iis-1803
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment