Skip to content

Instantly share code, notes, and snippets.

View jsturtevant's full-sized avatar
💻
right clicking and viewing the source

James Sturtevant jsturtevant

💻
right clicking and viewing the source
View GitHub Profile
@jsturtevant
jsturtevant / dns-startup.yaml
Created November 5, 2020 20:08
dns startup in windows containers
apiVersion: v1
kind: Pod
metadata:
name: dns-resolve
spec:
containers:
- name: test-resolve
image: mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2019
command: ["powershell.exe"]
args: ["/C", "for ($num = 1 ; $num -le 10000 ; $num++){ resolve-dnsname google.com }"]
# modified from https://github.com/Azure/aks-engine/blob/master/parts/k8s/windowsinstallopensshfunc.ps1
Param(
[Parameter(Mandatory = $true)][string[]]
$SSHKeys
)
$adminpath = "c:\ProgramData\ssh"
$adminfile = "administrators_authorized_keys"
@jsturtevant
jsturtevant / deployment.yaml
Last active September 30, 2020 21:26
Failure to get metrics
apiVersion: apps/v1
kind: Deployment
metadata:
name: iis-1809
labels:
app: iis-1809
spec:
replicas: 1
template:
metadata:
@jsturtevant
jsturtevant / deploy-aks-engine.sh
Created September 16, 2020 16:55
deploy aks-engine
#!/bin/bash
set -e -u -o pipefail
MODEL=${1:?provide model path}
modelname=$(basename $MODEL .json | sed 's/windows/win/g')
group=test-${modelname}-${RANDOM}
(
@jsturtevant
jsturtevant / hello.yaml
Created September 16, 2020 16:48
hello k8s yaml
# hello-kubernetes.yaml
apiVersion: v1
kind: Service
metadata:
name: hello-kubernetes
spec:
type: LoadBalancer
ports:
- port: 80
targetPort: 8080
@jsturtevant
jsturtevant / debug.md
Created September 11, 2020 17:47
Debugging Packer IMAGE_STATE_UNDEPLOYABLE

Windows sidebyside, C:\Windows\WinSxS if you have a pending.xml you need a restart

Errors for systemprep/boot of obee c:\windows\panther C:\Windows\Panther\setupact.log

@jsturtevant
jsturtevant / config
Created August 21, 2020 19:03
vscode ssh config
Host controlplane
HostName publicip
Port 22
User azureuser
Host windowsnode
HostName windowsnameorip
Port 22
ProxyCommand ssh controlplane -W %h:%p
User azureuser
@jsturtevant
jsturtevant / hyper-v-mutator.yaml
Created August 19, 2020 21:21
hyper-v-mutator
apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
name: hyper-v-mutator-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
@jsturtevant
jsturtevant / hyper-v-mutator.yaml
Created August 19, 2020 21:21
hyper-v-mutator
apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
name: hyper-v-mutator-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
apiVersion: apps/v1
kind: Deployment
metadata:
name: iis-1809-rt-rt
labels:
app: iis-1809-rt
spec:
replicas: 1
template:
metadata: