Skip to content

Instantly share code, notes, and snippets.

@shirhatti
Created June 19, 2020 08:57
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 shirhatti/ad7a986137d7ca6b1dc094a3e0a61a0d to your computer and use it in GitHub Desktop.
Save shirhatti/ad7a986137d7ca6b1dc094a3e0a61a0d to your computer and use it in GitHub Desktop.
Kubernetes manifest for dotnet-monitor
# This Deployment manifest defines:
# - single-replica deployment of the container image, with label "app: dotnet-hello-world"
# - Pod exposes port 8080
# - specify PORT environment variable to the container process
# Syntax reference https://kubernetes.io/docs/concepts/configuration/overview/
apiVersion: apps/v1
kind: Deployment
metadata:
name: dotnet-hello-world
spec:
replicas: 2
selector:
matchLabels:
app: dotnet-hello-world
template:
metadata:
annotations:
prometheus.io/scrape: 'true'
prometheus.io/port: "52325"
labels:
app: dotnet-hello-world
spec:
volumes:
- name: diagnostics
emptyDir: {}
containers:
- name: server
image: mcr.microsoft.com/dotnet/core/samples:aspnetapp
ports:
- containerPort: 80
volumeMounts:
- mountPath: /tmp
name: diagnostics
- name: sidecar
image: mcr.microsoft.com/dotnet/nightly/monitor
ports:
- containerPort: 52325
args: ["--urls", "http://*:52323", "--metricUrls", "http://*:52325"]
volumeMounts:
- name: diagnostics
mountPath: /tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment