Skip to content

Instantly share code, notes, and snippets.

View nshores's full-sized avatar
🏠
Working from home

Nick Shores nshores

🏠
Working from home
View GitHub Profile
@gavinmcfall
gavinmcfall / tb-talos.md
Last active May 4, 2025 00:59
Thunderbolt Networking on Talos

How To: Thunderbolt Networking on Talos

I have a cluster of 3 Minisforum MS-01 Mini PCs running Talos Linux for my k8s cluster. Previously, I had set these machines up using Debian & K3s for the cluster and configured Thunderbolt Networking by follow this video by Jim's Garage Which is baed on this gist series from scyto

Cabling

This is how I have mine connected, this means that each one of the my 3 nodes has a cable going to the other two nodes MS-01_TB_Cabling

@codeopensrc
codeopensrc / k8s-nameservers-fix.md
Last active January 6, 2025 23:10
Fix for kubernetes on DigitalOcean `Nameserver limits exceeded" err="Nameserver limits were exceeded, some nameservers have been omitted`

Fix for kubernetes on DigitalOcean Nameserver limits exceeded" err="Nameserver limits were exceeded, some nameservers have been omitted, the applied nameserver line is: 11.111.11.1 11.111.11.2 11.111.11.1" (example IP addresses used)

After ignoring the error for a bit, I finally had to absolutely solve it due to being unable to deploy a prometheus chart inside my kubernetes cluster.

This isn't really a step-by-step but more an accumulation of resources used/found to finally help solve my problem

TL;DR

  • Modify /etc/netplan/50-cloud-init.yaml removing some entries from IFACE.nameservers.address
    • netplan apply to apply changes
  • resolvctl to see changes to DNS Servers stanza for the IFACE modified
@hunterjm
hunterjm / frigate_notification.yaml
Last active June 4, 2025 20:57
Frigate Notification Blueprint
blueprint:
name: Frigate Notification
description: |
## Frigate Mobile App Notification
This blueprint will send a notification to your device when a Frigate event for the selected camera is fired. The notification will initially include the thumbnail of the detection, but will update to include actionable notifications allowing you to view the saved clip/snapshot when available, or silence the notification for a configurable amount of time.
With this blueprint, you may send the notification to multiple devices by leaving "Device" blank and instead use a [notification group][1].
### Required entities:
@Dapacruz
Dapacruz / panorama-dynamic-inventory.py
Created August 7, 2020 01:20
Panorama Dynamic Inventory for Ansible Tower
#!/usr/bin/env python2.7
import argparse
import json
import os
import sys
import urllib
import urllib2
import xml.etree.ElementTree as ET
@janeczku
janeczku / rancher-argocd.md
Created June 10, 2020 14:10
How to register Rancher managed Kubernetes clusters in Argo CD

How to register Rancher managed Kubernetes clusters in Argo CD

Registering Rancher managed clusters in Argo CD doesn't work out of the box unless the Authorized Cluster Endpoint is used. Many users will prefer an integration of Argo CD via the central Rancher authentication proxy (which shares the network endpoint of the Rancher API/GUI). So let's find out why registering clusters via Rancher auth proxy fails and how to make it work.

Hint: If you are just looking for the solution scroll to the bottom of this page.

Why do i get an error when running argocd cluster add?

Service Account tokens and the Rancher authentication proxy

@max-rocket-internet
max-rocket-internet / prom-k8s-request-limits.md
Last active May 20, 2025 11:55
How to display Kubernetes request and limit in Grafana / Prometheus properly

CPU: percentage of limit

A lot of people land when trying to find out how to calculate CPU usage metric correctly in prometheus, myself included! So I'll post what I eventually ended up using as I think it's still a little difficult trying to tie together all the snippets of info here and elsewhere.

This is specific to k8s and containers that have CPU limits set.

To show CPU usage as a percentage of the limit given to the container, this is the Prometheus query we used to create nice graphs in Grafana:

sum(rate(container_cpu_usage_seconds_total{name!~".*prometheus.*", image!="", container_name!="POD"}[5m])) by (pod_name, container_name) /
@judero01col
judero01col / Service KMS
Last active July 10, 2025 15:20
Volume License Activation Key Service - KMS
## Find Available Target Editions
DISM.exe /Online /Get-TargetEditions
## Convert Server Standard 2019 Evaluation to Server Standard 2019
DISM /online /Set-Edition:ServerStandard /ProductKey:N69G4-B89J2-4G8F4-WWYCC-J464C /AcceptEula
## How To Activate
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
slmgr /skms [server]:[port]
slmgr /ato
@phillijw
phillijw / traefik-docker-compose.yml
Last active January 28, 2021 19:08
Working traefik + zoneminder docker setup
version: '3'
services:
traefik:
image: traefik
restart: always
ports:
- "80:80" #http
- "443:443" #https
- "8080:8080" #web ui
@Dapacruz
Dapacruz / Redirect-VMHostLogs.ps1
Last active October 16, 2018 21:29
Redirect VMware ESXi Host Logs
$hosts = '*'
$datastore_name = 'NS-VMFS-01'
$datastore = Get-Datastore -Name $datastore_name | Select-Object -First 1
$log_dir = '[{0}] Logs' -f $datastore.Name
$scratch_location = '{0}/Logs' -f $datastore.ExtensionData.Info.Url -replace 'ds://'
foreach ($h in (Get-VMHost $hosts | Sort-Object -Property Name)) {
Write-Host "$($h.Name): Redirecting log files ..."
$result = Get-AdvancedSetting -Entity $h -Name Syslog.global.logDir | Set-AdvancedSetting -Value "$log_dir/$h" -Confirm:$false
Write-Host "New syslog location: $($result.Value)"
@Dapacruz
Dapacruz / Configure-Ntp.ps1
Created December 7, 2017 00:02
Configure/Enable NTP on a VMware ESXi Host
$hosts = '*'
$ntp_servers = '10.10.1.10', '10.10.1.5'
Get-VMHostService -VMHost $hosts | Where-Object {$_.key -eq 'ntpd'}
Get-VMHostNtpServer -VMHost $hosts
Add-VMHostNtpServer -VMHost $hosts -NtpServer $ntp_servers
Get-VMHostService -VMHost $hosts | Where-Object {$_.key -eq 'ntpd'} | Start-VMHostService | Set-VMHostService -Policy 'automatic'