Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vensas/dotnet-container-gc
Example project to test memory and GC behavior of ASP.NET minimal API on Kubernetes
https://github.com/vensas/dotnet-container-gc
dotnet grafana k6 kubernetes opentelemetry prometheus
Last synced: about 2 months ago
JSON representation
Example project to test memory and GC behavior of ASP.NET minimal API on Kubernetes
- Host: GitHub
- URL: https://github.com/vensas/dotnet-container-gc
- Owner: vensas
- Created: 2024-12-02T07:46:40.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-12-02T07:49:46.000Z (about 2 months ago)
- Last Synced: 2024-12-02T08:35:53.122Z (about 2 months ago)
- Topics: dotnet, grafana, k6, kubernetes, opentelemetry, prometheus
- Language: C#
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dotnet Containerization and Garbage Collection
ℹ️ This example was put together on a Mac using a *nix shell scripts and [homebrew](https://brew.sh) and may not work in other environments.
## Motivation
## Setup
### Install dependencies
```sh
brew install minikube kubectl kustomization k6
```### Run a local kubernetes cluster
```sh
minikube start
```*Note: To configure shell to use minikube docker environment, run*
```sh
eval $(minikube -p minikube docker-env)
```### Build the image
```sh
make build
```### Verify image is available
```sh
minikube image ls --format table
```### Setup test environment
```sh
kubectl apply -f ./kubectl/observability
```### Deploy service and expose endpoint
```sh
make serve_dotnet8 # for dotnet 8
make serve_dotnet9 # for dotnet 9
```Service is exposed on a random port on localhost. Copy URL and port printed out.
## Run Tests
### Install k6
```sh
brew install k6
```### Run k6 tests
```sh
k6 run k6/test.js -e MAX_USERS= -e BASE_URL
```### Access Grafana
```sh
minikube service grafana
```Login using default user `admin` with password `admin`.
Import Dashboard JSON from `./grafana/dotnet-opentelemetry-dashboard.json`.## Teardown
### Reset shell configuration
```sh
eval $(minikube docker-env --unset)
```