Replace dotnet-hello-world
and dotnet-monitor
with your desired container names
# Build a docker image for your application
docker build -t dotnet-hello-world ./src/
# Build the sidecar image for dotnet-monitor
docker build -t dotnet-monitor ./sidecar/
# Push your images
# If pushing to ACR, you may need to login
# az acr login -n <my-registry.acr.io>
docker push dotnet-hello-world
docker push dotnet-monitor
# Ensure your cluster has access to pull images from your registry
kubectl apply -f kubernetes-manifests/hello.deployment.yaml
kubectl apply -f kubernetes-manifests/hello.sevice.yaml
# Optional: If you have an ingress controller
kubectl apply -f kubernetes-manifests/hello.ingress.yaml
# Clean up
kubectl delete -f kubernetes-manifests/*.yml
Alternatively you can use Skaffold to run this application
# Replace my-registry.azurecr.io
skaffold config set default-repo my-registry.azurecr.io
skaffold run
# Clean up
skaffold delete
$ kubectl get pod -l app=dotnet-hello-world
NAME READY STATUS RESTARTS AGE
dotnet-hello-world-dc6f67566-t2dzd 2/2 Running 0 37m
$ kubectl port forward pods/dotnet-hello-world-dc6f67566-t2dzd
Forwarding from 127.0.0.1:7000 -> 52323
Forwarding from [::1]:7000 -> 52323
Once you've established a port forward, you can download diagnostic artifacts by hitting these endpoints:
- Process dump:
http://localhost:7000/dump
- CPU profile:
http://localhost:7000/cpuprofile