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 / ipv6-kubeproxy.yaml
Last active May 24, 2020 15:40
ipv6-kubeproxy.yaml
apiVersion: cluster.x-k8s.io/v1alpha3
kind: Cluster
metadata:
name: ${CLUSTER_NAME}
namespace: default
spec:
clusterNetwork:
pods:
cidrBlocks:
- 2001:1234:5678:9abd::/64
@jsturtevant
jsturtevant / docker-bridge-k8s.md
Created April 2, 2020 16:21
docker cidr's in aks
@jsturtevant
jsturtevant / dotnetfullframework.md
Created April 2, 2020 16:02
Tuning .NET Full Framework for perf

Default Connection limit

Default connection limit has a long history. The Default connection limit has been much higher since asp.net 4.0 in where it was updated to 12*number of threads. In 4.6.1 and higher it is auto configuration for you to MaxInt (https://referencesource.microsoft.com/#System.Web/HttpRuntime.cs,1200). Given the long history of the value changing from one framework to another (and if you on different platform you will get the default value of 2) it is recommended to manually set it so you have have control, even if you set it to MaxInt.

If you want to modify it to something that is different there are some articles here on what changes it affects: https://docs.microsoft.com/en-us/dotnet/framework/network-programming/managing-connections A good article for grasping the implications of modifing that value is: https://docs.microsoft.com/en-us/archive/blogs/jpsanders/understanding-maxservicepointidletime-and-defaultconnectionlimit

other settings

In addition, it is suggested to l

@jsturtevant
jsturtevant / portfoward-tilt
Last active March 20, 2020 23:12
cluster api azure
ssh -L 8888:localhost:10350 <remote-ip>
# now browse to localhost:8888
@jsturtevant
jsturtevant / nginx.conf
Last active September 23, 2019 19:59
nginx configuration for local oh services
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
#keepalive_timeout 0;
keepalive_timeout 65;
@jsturtevant
jsturtevant / assignSptoGroup.ps1
Created August 29, 2019 14:51
Add Service Principal to Azure AAD group
#https://stackoverflow.com/a/47769755/697126
$spn = Get-AzureADServicePrincipal -SearchString "yourSpName"
$group = Get-AzureADGroup -SearchString "yourGroupName"
Add-AzureADGroupMember -ObjectId $($group.ObjectId) -RefObjectId $($spn.ObjectId)
@jsturtevant
jsturtevant / run-netstat.ps1
Created February 12, 2019 05:55
runs netstat after a pod is killed
$dt = (Get-Date).ToString("MM-dd-yyyy HH:mm:ss")
$events=(.\kubectl.exe --kubeconfig='config' get events -o json | ConvertFrom-Json).items
Write-output "processing events"
ForEach ($event in $events) {
Write-output $event.reason
if ($event.reason -eq "Killing"){
#$message="found event at $dt"