https://github.com/neticdk/aks-win-oaas
Showcase OaaS on AKS with Windows workers
https://github.com/neticdk/aks-win-oaas
Last synced: 5 months ago
JSON representation
Showcase OaaS on AKS with Windows workers
- Host: GitHub
- URL: https://github.com/neticdk/aks-win-oaas
- Owner: neticdk
- License: mit
- Created: 2021-11-08T09:39:12.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2026-01-19T07:38:49.000Z (5 months ago)
- Last Synced: 2026-01-19T16:26:06.793Z (5 months ago)
- Language: HCL
- Size: 43.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Windows Container Observability
Small repository to showcase instrumenting Azure Kubernetes Service containing node pool with Windows worker nodes. The Terraform scripts
will create a AKS cluster and deploy Windows capable observabilit stack. A Grafana will be running inside of the cluster with a set of
dashboards to show cluster wide data both from Windows and Linux hosts.
## Window Workload
A small workload based on Windows containers can be deployed by applying the following resources.
```yaml
apiVersion: v1
kind: Service
metadata:
name: win-webserver
labels:
app: win-webserver
spec:
ports:
- port: 80
targetPort: http
selector:
app: win-webserver
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: win-webserver
name: win-webserver
spec:
replicas: 2
selector:
matchLabels:
app: win-webserver
template:
metadata:
labels:
app: win-webserver
name: win-webserver
spec:
containers:
- name: windowswebserver
image: mcr.microsoft.com/windows/servercore:ltsc2019
command:
- powershell.exe
- -command
- "<#code used from https://gist.github.com/19WAS85/5424431#> ; $$listener = New-Object System.Net.HttpListener ; $$listener.Prefixes.Add('http://*:80/') ; $$listener.Start() ; $$callerCounts = @{} ; Write-Host('Listening at http://*:80/') ; while ($$listener.IsListening) { ;$$context = $$listener.GetContext() ;$$requestUrl = $$context.Request.Url ;$$clientIP = $$context.Request.RemoteEndPoint.Address ;$$response = $$context.Response ;Write-Host '' ;Write-Host('> {0}' -f $$requestUrl) ; ;$$count = 1 ;$$k=$$callerCounts.Get_Item($$clientIP) ;if ($$k -ne $$null) { $$count += $$k } ;$$callerCounts.Set_Item($$clientIP, $$count) ;$$ip=(Get-NetAdapter | Get-NetIpAddress); $$header='
Windows Container Web Server
' ;$$callerCountsString='' ;$$callerCounts.Keys | % { $$callerCountsString+='IP {0} callerCount {1} ' -f $$ip[1].IPAddress,$$callerCounts.Item($$_) } ;$$footer='' ;$$content='{0}{1}{2}' -f $$header,$$callerCountsString,$$footer ;Write-Output $$content ;$$buffer = [System.Text.Encoding]::UTF8.GetBytes($$content) ;$$response.ContentLength64 = $$buffer.Length ;$$response.OutputStream.Write($$buffer, 0, $$buffer.Length) ;$$response.Close() ;$$responseStatus = $$response.StatusCode ;Write-Host('< {0}' -f $$responseStatus) } ; "
ports:
- name: http
containerPort: 80
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 500m
memory: 512Mi
nodeSelector:
kubernetes.io/os: windows
```