{"id":19099664,"url":"https://github.com/kdcllc/k8.dotnetcore.workshop","last_synced_at":"2025-04-30T16:22:46.777Z","repository":{"id":96458994,"uuid":"212479136","full_name":"kdcllc/K8.DotNetCore.Workshop","owner":"kdcllc","description":"Kubernates and DotNetCore Workshop demonstrates essentials skills for DotNetCore Developer","archived":false,"fork":false,"pushed_at":"2022-10-20T18:27:59.000Z","size":966,"stargazers_count":17,"open_issues_count":4,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T05:15:40.751Z","etag":null,"topics":["asp-net-core","aspnet-product","aspnetcore","azure-storage","cluster","docker","docker-compose","dotnetcore3","helm-charts","ingress","kdcllc","kubernetes","kubernetes-cluster","kubernetes-deployment","learning-by-doing","workshop","workshop-materials"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kdcllc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-03T02:00:37.000Z","updated_at":"2023-10-31T12:13:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"6c6eb8b4-ef53-4bbc-86ae-f93d89f5d386","html_url":"https://github.com/kdcllc/K8.DotNetCore.Workshop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kdcllc%2FK8.DotNetCore.Workshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kdcllc%2FK8.DotNetCore.Workshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kdcllc%2FK8.DotNetCore.Workshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kdcllc%2FK8.DotNetCore.Workshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kdcllc","download_url":"https://codeload.github.com/kdcllc/K8.DotNetCore.Workshop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251740251,"owners_count":21636006,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asp-net-core","aspnet-product","aspnetcore","azure-storage","cluster","docker","docker-compose","dotnetcore3","helm-charts","ingress","kdcllc","kubernetes","kubernetes-cluster","kubernetes-deployment","learning-by-doing","workshop","workshop-materials"],"created_at":"2024-11-09T03:52:09.591Z","updated_at":"2025-04-30T16:22:46.769Z","avatar_url":"https://github.com/kdcllc.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kubernetes DotNetCore Workshop\n\nThis workshop will provide with ability to learn the basics of the Kubernetes development from DotNetCore developer perspective.\n\nThe solution includes the following projects:\n![Application layout](./docs/img/app-diagram.jpg)\n\n- `K8.AspNetCore.HealthChecks.csproj` - a simple project that demonstrates how to add custom HealthChecks.\n- `K8.Extensions.Configuration.csproj` - a project that creates a custom Azure Key Vault Secrets retrieval.\n- `K8.Extensions.Hosting.csproj` - a project that demonstrates how to extend hosting creation for the common K8s projects.\n- `K8.FrontEnd.csproj` - the `AspNetCore` Web Api project that demonstrates usage of health and liveliness checks.\n- `K8.LongProcess.csproj` - the DotNetCore 3.0 Worker Hosted Console App that runs custom K8s CronJobs.\n\n## Technologies\n\n- Docker Containers\n- Kubernetes Cluster\n- Helm deployment\n- Microsoft Azure Managed Identity (MSI)\n\n## Pre-requisites\n\n1. Install Docker and Local Kubernetes Cluster on Windows 10\n\n- [Install Hyper-V on Windows 10](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v)\n\n- [Install Docker Desktop on Windows](https://docs.docker.com/docker-for-windows/install/)\n\n- Enable Local Kubernetes Cluster: Docker --\u003e Settings --\u003e Kubernetes\n![Windows 10 Kubernetes local cluster](./docs/img/win10-docker-k8s-local-cluster.jpg)\n\n- [Install alternative K8 dashboard](https://github.com/kubernetes/dashboard/releases/tag/v1.10.1)\n\nThis dashboard doesn't require token authentication, since the cluster is running on the local machine.\n\n```bash\n    # install\n    kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/alternative/kubernetes-dashboard.yaml\n\n    # launch the dashboard\n    kubectl proxy\n\n    # dashboard url 'http://localhost:8001/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/#!/overview?namespace=default'\n```\n\nThe UI dashboard is useful for learning and management purposes.\n\n[Open Local Kuberbetes Cluster Dashboard](http://localhost:8001/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/#!/overview?namespace=default)\n\n- [Install `Ngnix` Ingress Controller inside Local Kubernetes Cluster](https://kubernetes.github.io/ingress-nginx/deploy/#docker-for-mac)\n\nThis component is required for the labs.\n\n```bash\n    # installation\n    kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/mandatory.yaml\n    kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/cloud-generic.yaml\n\n    # validate installation\n    kubectl get pods --all-namespaces -l app.kubernetes.io/name=ingress-nginx --watch\n```\n\n2. [Install the Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest)\n\n3. [Install Visual Studio Code](https://code.visualstudio.com/insiders/)\n\n4. Update Windows 10 Hosts file update to include `C:\\Windows\\System32\\drivers\\etc\\hosts`\n\n```txt\n    127.0.0.1 kubernetes.docker.internal k8-frontend-app.local\n```\n\nThis `hosts` entry provides with the following local development Url for the application\n\n[https://k8-frontend-app.local/weatherforecast](https://k8-frontend-app.local/weatherforecast)\n\n5. [Install `Local Managed Service Identity (MSI) Azure Local Authenticator`](./docs/azure-vault.md)\n\n6. [Create Azure Key Vault](https://docs.microsoft.com/en-us/cli/azure/keyvault?view=azure-cli-latest#az-keyvault-create)\n\n7. [Create Azure Storage Account](./docs/azure-storage.md)\n\n## Labs\n![K8 Cluster and Azure Resources](./docs/img/k8-azure-diagram.jpg)\n\n1. [Lab: Build Docker Images](./docs/docker.md)\n2. [Lab: `Kubectl` commands](./docs/kubectl.md)\n3. [Lab:  Helm simple release](./docs/helm-simple.md)\n4. [Lab:  Helm templated release](./docs/helm-templated.md)\n\n## References\n\n### Windows Terminal\n\n- [Enable Copy \u0026 Paste Keybindings](https://github.com/microsoft/terminal/issues/968#issuecomment-518568762)\n\n### General Ideas\n\n- [LIVENESS PROBES ARE DANGEROUS](https://srcco.de/posts/kubernetes-liveness-probes-are-dangerous.html)\n\n- [Graceful termination in Kubernetes with ASP.NET Core](https://blog.markvincze.com/graceful-termination-in-kubernetes-with-asp-net-core/)\n\n- [Getting external traffic into Kubernetes – ClusterIp, NodePort, LoadBalancer, and Ingress](https://www.ovh.com/blog/getting-external-traffic-into-kubernetes-clusterip-nodeport-loadbalancer-and-ingress/)\n\n- [Kubernetes Ingress scenario](https://codeburst.io/replicate-kubernetes-ingress-locally-with-docker-compose-2872e650af6b)\n\n### AKS specific\n\n- [Deploy a SQL Server container in Kubernetes with Azure Kubernetes Services (AKS)](https://docs.microsoft.com/en-us/sql/linux/tutorial-sql-server-containers-kubernetes?view=sql-server-ver15)\n\n- [Create an ingress controller with a static public IP address in Azure Kubernetes Service (AKS)](https://docs.microsoft.com/en-us/azure/aks/ingress-static-ip)\n\n- [Deploying a Stateful Application on Azure Kubernetes Service (AKS)](https://blog.risingstack.com/deploying-a-stateful-application-on-azure-kubernetes-service-aks/)\n\n- [Use Azure managed identities with Azure Kubernetes Services (AKS)](https://blog.jcorioland.io/archives/2018/09/05/azure-aks-active-directory-managed-identities.html)\n\n- [Azure/aad-pod-identity](https://github.com/Azure/aad-pod-identity)\n\n- [Control access to cluster resources using role-based access control and Azure Active Directory identities in Azure Kubernetes Service](https://docs.microsoft.com/en-us/azure/aks/azure-ad-rbac)\n\n- [Key Vault FlexVolume](https://github.com/Azure/kubernetes-keyvault-flexvol)\n\n- [Manually create and use a volume with Azure Files share in Azure Kubernetes Service (AKS)](https://docs.microsoft.com/en-us/azure/aks/azure-files-volume)\n\n- [How to: Mount an Azure Storage File Share to containers in Azure Kubernetes Services (AKS)](https://zimmergren.net/mount-an-azure-storage-file-share-to-deployments-in-azure-kubernetes-services-aks/)\n\n- [Configure agent data collection for Azure Monitor for containers](https://docs.microsoft.com/en-us/azure/azure-monitor/insights/container-insights-agent-config)\n\n### Ingress LetsEncrypt\n\n- [Service principals with Azure Kubernetes Service (AKS)- Manually create a service principal](https://docs.microsoft.com/en-us/azure/aks/kubernetes-service-principal#manually-create-a-service-principal)\n\n- [Create an ingress controller with a static public IP address in Azure Kubernetes Service (AKS)](https://docs.microsoft.com/en-us/azure/aks/ingress-static-ip)\n\n- [fbeltrao/aks-letsencrypt step thru](https://github.com/fbeltrao/aks-letsencrypt/blob/master/install-nginx-ingress.md)\n\n- [https://dev.to/ianknighton/deploying-a-microservice-on-azure-kubernetes-with-lets-encrypt-4eon](https://dev.to/ianknighton/deploying-a-microservice-on-azure-kubernetes-with-lets-encrypt-4eon)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkdcllc%2Fk8.dotnetcore.workshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkdcllc%2Fk8.dotnetcore.workshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkdcllc%2Fk8.dotnetcore.workshop/lists"}