jsturtevant / windows-k8s-playground

Playground for playing with Windows on Kubernetes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

k8 with Windows Containers

Playground for playing with Windows on Kubernetes.

Create Resource Group and Service Principle

az login
az account set --subscription="${SUBSCRIPTION_ID}"
az group create -n acsengine-win -l eastus
az ad sp create-for-rbac --role="Owner" --scopes="/subscriptions/${SUBSCRIPTION_ID}/resourceGroups/acsengine-win"

Copy output for updating kubernetes.json in next step.

Create the cluster

  • Update fields in kubernetes.json (service principle/password/public key)
  • Run ACS Engine to generate output: acs-engine generate kubernetes.json
  • Deploy cluster: az group deployment create --name acsenginedeploy -g acsengine-win --template-file "_output/acsengine-win/azuredeploy.json" --parameters "./_output/acsengine-win/azuredeploy.parameters.json"
  • Set your context: export KUBECONFIG=_output/acsengine-win/kubeconfig/kubeconfig.eastus.json
  • Double check your config: k config current-context
  • see your window nodes and linux nodes: k get nodes -o wide

Deploy Service

Scale

/mnt/c/tools/acs-engine.exe scale --subscription-id <sub-id> \
    --resource-group acsengine-win-193  --location eastus \
    --deployment-dir _output/acsengine-win-193 --new-node-count 3 \
    --node-pool windowspool2 --master-FQDN acsengine-win-193.eastus.cloudapp.azure.com

About

Playground for playing with Windows on Kubernetes.

License:MIT License


Languages

Language:Shell 91.0%Language:PowerShell 9.0%