Skip to content

Instantly share code, notes, and snippets.

View palma21's full-sized avatar

Jorge Palma palma21

View GitHub Profile
apiVersion: v1
kind: Pod
metadata:
name: nginx-privileged
spec:
containers:
- name: nginx-privileged
image: nginx
securityContext:
privileged: true
@palma21
palma21 / tcpdump-kubernetes
Created October 29, 2020 08:27 — forked from dcasati/tcpdump-kubernetes
visualize a tcpdump capture from a Kubernetes POD on Wireshark in real time
run tcpdump on a POD and then (live) see that information through wireshark locally on my machine. the magic of ssh and fifo 
Topology
--------
[laptop with wireshark] ------> [AKS Node] ----> [POD (tcpdump is here)]. 
1. create the fifo on your local machine (where wireshark will run)
mkfifo /tmp/remote-capture.fifo
2. execute the following command to send traffic from within a POD to the stdout. This will then be redirected to the fifo locally
@palma21
palma21 / README.md
Last active January 20, 2020 15:41 — forked from cpuguy83/README.md

This script helps to clean up vmss nodes that may have Azure disks attached to it that should not be due to bugs in Kubernetes. The specific case for this is that a disk has been re-attached to by Kubernetes when it should not have been.

This DOES NOT detect a bad node/disk, only assists in cleaning it up.

Usage

$ ./vmssfix.sh NODE_NAME PV_NAME