Skip to content

Instantly share code, notes, and snippets.

View randomvariable's full-sized avatar
⬇️
Downstream. I may be slow to respond.

Naadir Jeewa randomvariable

⬇️
Downstream. I may be slow to respond.
View GitHub Profile
@randomvariable
randomvariable / template.yaml
Last active July 13, 2021 12:03
injected template
apiVersion: v1
data: ${CNI_RESOURCES}
kind: ConfigMap
metadata:
name: cni-${CLUSTER_NAME}-crs-0
namespace: default
---
apiVersion: addons.cluster.x-k8s.io/v1alpha4
kind: ClusterResourceSet
metadata:
@randomvariable
randomvariable / dns_client_log.ps1
Last active November 28, 2021 22:09
DNS Client Logging on Windows
function Start-DNSClientLog {
$DnsOpLog = Get-WinEvent -ListLog Microsoft-Windows-DNS-Client/Operational
$DnsOpLog.IsEnabled = $true
$DnsOpLog.SaveChanges()
}
function Get-DNSClientQueries {
foreach($event in (get-winevent Microsoft-Windows-DNS-Client/Operational | % { [xml]$_.ToXml() })) {
$Query = ($event.Event.EventData.Data | Where-Object { $_.Name -eq "QueryName" }).'#text'
#!/bin/bash
declare -A seenNamespaces
declare -A containerInfo
# Ensure ipcs command is available
ipcsPath=$(which ipcs)
if [ -z "$ipcsPath" ]; then
echo "ipcs command could not be found"
exit
@randomvariable
randomvariable / netshoot.yaml
Created September 17, 2020 15:32
netshoot.yaml
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: netshoot
labels:
app: netshoot
spec:
updateStrategy:
type: RollingUpdate