Skip to content

Instantly share code, notes, and snippets.

View PatrickLang's full-sized avatar

Patrick Lang PatrickLang

  • Washington, USA
View GitHub Profile
@PatrickLang
PatrickLang / README.md
Last active February 8, 2019 00:51
Investigating pod startup time

Investigations for kubernetes/kubernetes#72722

$ kubectl scale deploy iis-2019 --replicas=10
deployment.extensions/iis-2019 scaled
patrick@planglx1:~/aznet17+ssh$ kubectl get pod -o wide -w
NAME                        READY   STATUS              RESTARTS   AGE     IP             NODE         NOMINATED NODE
@PatrickLang
PatrickLang / README.md
Last active February 5, 2019 02:45
SIG-Windows Standup & Triage
@PatrickLang
PatrickLang / README.md
Last active March 16, 2022 13:06
Experiments with namespaces on Windows Pods
  1. kubectl create -f iis-multi.yml

  2. Log into the node

I can see the three containers running - pause, iis and windowswebserver. If I do a docker exec ... tasklist on each one, the processes listed are separate.

docker ps |select-string p7rm7
@PatrickLang
PatrickLang / netfix.cmd
Last active January 16, 2019 01:52
Packet capture and deleting HNS networks
# start packet capture
Cmd /c """netsh trace start globallevel=6 provider={0c885e0d-6eb6-476c-a048-2457eed3a5c1} keywords=0xffffffff provider=Microsoft-Windows-TCPIP level=5 provider={80CE50DE-D264-4581-950D-ABADEEE0D340} provider={D0E4BC17-34C7-43fc-9A72-D89A59D6979A} provider={93f693dc-9163-4dee-af64-d855218af242} provider={564368D6-577B-4af5-AD84-1C54464848E6} scenario=Virtualization provider=Microsoft-Windows-Hyper-V-VfpExt capture=yes provider=microsoft-windows-winnat provider={AE3F6C6D-BF2A-4291-9D07-59E661274EE3} keywords=0xffffffff level=6 provider={9B322459-4AD9-4F81-8EEA-DC77CDD18CA6} keywords=0xffffffff level=6 provider={0c885e0d-6eb6-476c-a048-2457eed3a5c1} level=6 report=disabled tracefile=c:\server.etl overwrite=yes persistent=yes"""
# try accessing network
curl.exe http://13.66.169.180
# stop packet capture
netsh trace stop
# Keep Kubernetes from starting back up
@PatrickLang
PatrickLang / README.md
Last active January 15, 2019 21:31
Improved Windows Kubernetes setup experience

This is a brief brain-dump of the investigations I've done into how to make Kubernetes easier to setup along with some options suggested by others in SIG-Windows.

Getting binaries on the machine

  • aks-engine set precedence of putting things in c:\k. Is that the best decision? Should executables, logs and config be separated and ACLd more strongly?

Options:

  • MSI - would need to be built along with binaries. Not useful for configuration management & transitions though
@PatrickLang
PatrickLang / README.md
Last active January 8, 2019 01:39
Building kubernetes/kubernetes with Bazel

Here's what I tried after reading https://github.com/kubernetes/community/blob/master/contributors/devel/bazel.md

sudo apt install golang
export GOPATH=~/go
go get k8s.io/kubernetes/vendor/github.com/bazelbuild/bazel-gazelle/cmd/gazelle
go install k8s.io/kubernetes/vendor/github.com/bazelbuild/bazel-gazelle/cmd/gazelle
hack/update-bazel.sh # this returned some errors, but the next step still seemed to work
make bazel-build # this failed running out of disk space for me
@PatrickLang
PatrickLang / expand_and_rename.ps1
Created January 7, 2019 20:04
Expand & organize a bunch of stuff downloaded from BandCamp
gci *.zip | %{ Expand-Archive $_ }
gci -Directory | %{
$parts = $_.Name.Split("-")
$artist = $parts[0].TrimEnd().TrimStart()
$album = (-join $parts[1..($parts.Length-1)]).TrimEnd().TrimStart()
$newdirname = [System.IO.Path]::Combine($artist,$album)
$newdir = mkdir $newdirname
Move-item $_\* $newdir
Remove-Item $_
}
@PatrickLang
PatrickLang / README.md
Last active March 4, 2023 05:49
Setting up a multi-arch Kubernetes cluster on ODroid HC-1 and Pine64 Rock64
@PatrickLang
PatrickLang / README.md
Last active December 10, 2018 01:44
Resources used at Kubecon 2018

Tools

ACS-Engine - Getting started guide for Windows clusters is usually the right place to start. I did a lot of last minute work to move this forward to Windows Server 2019. Right now there isn't a known-good release that's been fully tested with Windows Server 2019, so I'll share the one I used

Helm - no changes

Draft - no changes

@PatrickLang
PatrickLang / README.md
Last active December 9, 2018 05:15
Setting up VMs for my Kubecon 2018 session