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
@aojea
aojea / README.md
Last active January 22, 2024 05:48
Sniff CNI commands

CNI SNIFFER

The Container Networking Interface, or CNI, is a generic plugin-based networking solution for configuring the network on containers.

The CNI specification defines:

  1. A format for administrators to define network configuration.
  2. A protocol for container runtimes to make requests to network plugins.
  3. A procedure for executing plugins based on a supplied configuration.
  4. A procedure for plugins to delegate functionality to other plugins.
@jborean93
jborean93 / Trace-TlsHandshake.ps1
Last active December 7, 2023 14:49
Debug TLS Handshakes using .NET
# Copyright: (c) 2022, Jordan Borean (@jborean93) <[email protected]>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
Function Trace-TlsHandshake {
<#
.SYNOPSIS
TLS Handshake Diagnostics.
.DESCRIPTION
Performs a TLS handshake and returns diagnostic information about that
@jsturtevant
jsturtevant / notes.md
Last active August 21, 2020 18:56
Hyper-v aks-engine
@jsturtevant
jsturtevant / apiserver
Last active February 4, 2022 23:47
Windows debug
http://localhost:8001/api/v1/nodes/2618k8s000/proxy/stats/summary
https://github.com/kubernetes/kubernetes/blob/1f70708f6cc85985725c11cd69c4965c1f97b314/pkg/kubelet/server/server.go#L17
http://localhost:8001/api/v1/nodes/win-p-win000000/proxy/logs/kubelet/
@melmaliacone
melmaliacone / prometheus-grafana-monitoring.md
Last active October 5, 2021 10:24
Using Prometheus and Grafana to Monitor Kubernetes Clusters and NGINX Metrics

Using Prometheus and Grafana to Monitor Kubernetes Clusters and NGINX Metrics

You can create your own Grafana dashboard from scratch, but this guide will show you how to import an already existing Grafana dashboard that contains most of the Kubernetes and NGINX metrics you would want to monitor.

Prerequisites

  • Kubernetes cluster
  • Helm 3

Note: If you need to migrate from Helm 2 to Helm 3, I recommend using this plugin.

#!/bin/sh
#https://itnext.io/get-a-shell-to-a-kubernetes-node-9b720a15a4fe
set -x
node=${1}
nodeName=$(kubectl get node ${node} -o template --template='{{index .metadata.labels "kubernetes.io/hostname"}}')
nodeSelector='"nodeSelector": { "kubernetes.io/hostname": "'${nodeName:?}'" },'
podName=${USER}-nsenter-${node}
kubectl run ${podName:?} --restart=Never -it --rm --image overriden --overrides '
{
"spec": {
@vyta
vyta / troubleshooting-performance-on-windows-with-containers.md
Last active November 21, 2018 00:59
Troubleshooting Performance on Windows w/ Containers

Observation

Approximately 10% increase in CPU usage when running containerized application vs running the application directly on the host

Troubleshooting

Tools & Setup:

  • Windows Performance Recorder: built-in tool to troubleshoot performance related issues on Windows.
@noelbundick
noelbundick / k8s-azure.json
Created August 16, 2018 21:53
k8s Azure Cloud Provider permissions
{
"Name": "Azure k8s Cloud Provider",
"IsCustom": true,
"Description": "Everything needed by the k8s 1.11 Azure cloud provider (not including ACR, addons, etc)",
"Actions": [
"Microsoft.Compute/disks/delete",
"Microsoft.Compute/disks/read",
"Microsoft.Compute/disks/write",
"Microsoft.Compute/virtualMachineScaleSets/manualUpgrade/action",
"Microsoft.Compute/virtualMachineScaleSets/read",
@vyta
vyta / alerts-with-prometheus.md
Created June 27, 2018 21:00
Alerts with Prometheus

Alerts with Prometheus

The helm installation makes it particularly simple to get going: https://github.com/kubernetes/charts/tree/master/stable/prometheus.

Now you just have to worry about

  1. Creating the alert
  2. Creating the alert rules

Creating the alert

What kind of alert do you want and where do you want it to go? This is defined in the configMap for alertManager, which can be found in the alertmanagerFiles.alertmanager.yml portion of the values.yaml file of the helm chart.