Deploy and investigate app deployment on Windows Node
oc get nodes -l kubernetes.io/os=windows
oc new-project windows-workloads
oc create -f https://gist.githubusercontent.com/welshstew/9125d7e17ed87dbff81017ebb9309831/raw/4d522e5bf6cadd8a6b1ae9f71319c7ddc20fcbaf/win-webserver.yaml
oc get pods -n windows-workloads -o wide
oc get deploy win-webserver -n windows-workloads -o jsonpath='{.spec.template.spec.tolerations}' | jq -r
oc -n openshift-windows-machine-config-operator rsh deploy/winc-ssh
sshcmd.sh ${IP_ADDRESS}
PS C:\Users\Administrator> docker images
PS C:\Users\Administrator> Get-Process | ?{ $_.ProcessName -match "kube|overlay|docker" }
PS C:\Users\Administrator> docker ps
PS C:\Users\Administrator> exit
oc expose svc/win-webserver -n windows-workloads
curl -s http://$(oc get route win-webserver -n windows-workloads -o jsonpath='{.spec.host}')
oc -n windows-workloads exec -it deploy/win-webserver -- powershell
PS C:\> tasklist /M /FI "IMAGENAME eq powershell.exe" | Select-String -Pattern http
PS C:\Users\Administrator> exit
Scale windows nodes
oc get machinesets -n openshift-machine-api | grep windows
oc get machines -n openshift-machine-api -l machine.openshift.io/os-id=Windows
oc describe node ${NODE} | grep -i Taint
oc scale machineset ${MACHINESET} --replicas=2 -n openshift-machine-api
oc logs deploy/windows-machine-config-operator -n openshift-windows-machine-config-operator -f
oc scale machineset ${MACHINESET} --replicas=1 -n openshift-machine-api
oc get events -n openshift-machine-api
Check Operator
oc get OperatorGroup -n openshift-windows-machine-config-operator
oc get Subscription -n openshift-windows-machine-config-operator
oc get csv -n openshift-windows-machine-config-operator
NetCandy Store .net Core app + MSSQL DB running on linux nodes talking to .NET Windows app running on Windows Server Node
Note: Once you've verified you are a cluster admin, you can extract the following information. You will need the hostname of the Windows node installed and the ssh-key used to login to the Windows Node. The reason for this is part of the Helm Chart deploys a Job that downloads the image of the frontend application as a pre-deploy task.
helm version
chmod go-r /home/ec2-user/.kube/config
$ export WSSHKEY=$(oc get secret cloud-private-key -n openshift-windows-machine-config-operator -o jsonpath='{.data.private-key\.pem}')
$ export WNODE=$(oc get nodes -l kubernetes.io/os=windows -o jsonpath='{.items[0].metadata.name}')
helm repo add redhat-demos https://redhat-developer-demos.github.io/helm-repo
helm repo update
helm install ncs --namespace netcandystore \
--create-namespace --timeout=1200s \
redhat-demos/netcandystore \
--set ssh.hostkey=${WSSHKEY} --set ssh.hostname=${WNODE}
Explore deployment
oc get pods -n netcandystore -l app=netcandystore -o wide
oc get nodes -l kubernetes.io/os=windows
oc get pods -n netcandystore -l app=getcategories -o wide
oc get route netcandystore -n netcandystore -o jsonpath='{.spec.host}{"\n"}'