apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: win-webserver-no-taint
  name: win-webserver-no-taint
spec:
  selector:
    matchLabels:
      app: win-webserver-no-taint
  replicas: 1
  template:
    metadata:
      labels:
        app: win-webserver-no-taint
      name: win-webserver-no-taint
    spec:
      containers:
      - name: windowswebserver
        image: mcr.microsoft.com/windows/servercore:ltsc2019
        imagePullPolicy: IfNotPresent
        command:
        - powershell.exe
        - -command
        - $listener = New-Object System.Net.HttpListener; $listener.Prefixes.Add('http://*:80/'); $listener.Start();Write-Host('Listening at http://*:80/'); while ($listener.IsListening) { $context = $listener.GetContext(); $response = $context.Response; $content='<html><body><H1>Windows Container Web Server</H1></body></html>'; $buffer = [System.Text.Encoding]::UTF8.GetBytes($content); $response.ContentLength64 = $buffer.Length; $response.OutputStream.Write($buffer, 0, $buffer.Length); $response.Close(); };
      nodeSelector:
        beta.kubernetes.io/os: windows
