Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arnab-developer/aksdemo
Deploy ASP.NET web api to AKS
https://github.com/arnab-developer/aksdemo
aks-kubernetes-cluster aspnet-web-api
Last synced: about 1 month ago
JSON representation
Deploy ASP.NET web api to AKS
- Host: GitHub
- URL: https://github.com/arnab-developer/aksdemo
- Owner: Arnab-Developer
- License: mit
- Created: 2021-11-09T06:56:48.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-13T03:59:31.000Z (almost 3 years ago)
- Last Synced: 2024-11-16T09:31:06.087Z (3 months ago)
- Topics: aks-kubernetes-cluster, aspnet-web-api
- Language: C#
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AKS demo
This is a demo to show how we can deploy ASP.NET web api into AKS.
Creating docker image and push to dockerhub has been done with GitHub action, then pull the image
from dockerhub and deploy to AKS has been done manually. I was getting some issues related to Azure
login from GitHub action, so I manually deployed the containers to AKS.Steps to manually deploy to AKS with dockerhub image:
- Create a new AKS resource in Azure
- Login to Azure PowerShell from your local computer or use CloudShell
- Install `kubectl` in your local machine if not already. If you are using CloudShell then `kubectl` is already
installed
- Import AKS credentials```
Import-AzAksCredential -ResourceGroupName -Name
```- Deploy to AKS (`aks-deploy.yml` is in the root of the repo)
```
kubectl apply -f aks-deploy.yml
```- Check the nodes and pods
```
kubectl get nodeskubectl get pods
```- Get the external ips of the services (you can also get the external ips from Azure Portal)
```
kubectl get service api1kubectl get service api2
```- Open web browser and navigate to the url and you should be able to see the output
```
http:///HelloApi?name=Jonhttp:///HelloApi?name=Jon
```Full tutorial
[here](https://docs.microsoft.com/en-us/azure/aks/tutorial-kubernetes-prepare-app).