Just a simple little .Net Core console app to heartbeat to the console. Used for testing Kubernetes and Application Performance Monitoring of Kubernetes. If you need to have a continer running to troubleshoot monitoring this will fill the bill while consuming relatively small amounts of resources.
All commands are for Windows Powershell. Most will work in bash
, except the $timestamp
function. If you are working in bash
you'll need to translate that.
# Note, your username is not your email address. Login from the browser to see what your username is.
docker login
$timestamp = (Get-Date).tostring("yyyyMMddhhmmss")
docker build -t netcorehello:$timestamp .
docker tag netcorehello:$timestamp netcorehello:latest
docker run -d -p 5000:5000 --restart=always --name registry registry:2
docker tag netcorehello:latest localhost:5000/netcorehello:latest
docker push localhost:5000/netcorehello:latest
kubectl apply -f deployment.yaml
kubectl get pods
kubectl logs pod/netcorehello-fd5cc4d5b-c6l9w --namespace=default --container=netcorehello -f
kubectl delete deployment netcorehello