Skip to content

Instantly share code, notes, and snippets.

View flrichar's full-sized avatar
Context is key.

Fred Richards flrichar

Context is key.
  • SUSE Rancher
  • Marcellus, NY
View GitHub Profile
@jmarhee
jmarhee / harvester-boot.sh
Created May 1, 2024 17:24
Boots a two-node Harvester cluster.
#!/bin/bash
CLUSTER_TAG=harvester-$(openssl rand -hex 6)
ISO=/var/lib/libvirt/images/harvester-v1.3.0-amd64.iso
for i in {1..2}; do \
VM_NAME=$(openssl rand -hex 4); \
sudo qemu-img create /var/lib/libvirt/images/${CLUSTER_TAG}-${VM_NAME}-ROOT_VOL.img 180G; \
sudo qemu-img create /var/lib/libvirt/images/${CLUSTER_TAG}-${VM_NAME}-DATA_VOL.img 250G; \
sudo virt-install \

Install Elemental with virt-install on KVM

Using virt-install to install SUSE Elemental on KVM.

Prerequisites

When creating your Machine Registration Endpoint in the Rancher UI, ensure that registration.emulated-tpm-seed is set to -1, if you plan to add more than a single machine using the ISO you will be building.

For example:

@thimslugga
thimslugga / unifi-ubuntu-jammy.sh
Last active September 6, 2024 11:58
Setup UniFi Controller v8.x+ on Ubuntu
#!/usr/bin/env bash
### Setup UniFi Controller Software on Ubuntu ###
# - Download Ubuntu 22.04: https://releases.ubuntu.com/jammy/
# - UniFi Controller Software Releases: https://community.ui.com/releases
# - Updating and Installing Self-Hosted UniFi Network Servers (Linux): https://help.ui.com/hc/en-us/articles/220066768
# - Self-Hosting a UniFi Network Server: https://help.ui.com/hc/en-us/articles/360012282453
# - UniFi - Repairing Database Issues on the UniFi Network Application: https://help.ui.com/hc/en-us/articles/360006634094
# - UISP Installation Guide: https://help.ui.com/hc/en-us/articles/115012196527-UNMS-Installation-Guide
@yankcrime
yankcrime / k3s-cilium-egress.md
Last active August 28, 2023 10:08
K3s and Cilium - no kube-proxy and support for static egress IP

K3s and Cilium with the Egress IP Gateway feature

This is a short guide to deploying a three-node Kubernetes cluster using K3s, including kube-vip to provide a HA control-plane and to manage LoadBalancer Service resources, and finally as Cilium as our CNI with the Egress Gateway feature enabled. We'll also heavily lean into Cilium's support for eBPF by doing away with kube-proxy entirely, but note that this does come with some limitations.

First, let's set some common options for K3s:

export K3S_VERSION="v1.22.4+k3s1"
export K3S_OPTIONS="--flannel-backend=none --no-flannel --disable-kube-proxy --disable-network-policy"
@toricls
toricls / lima-on-m1-mac-installation-guide.md
Last active April 25, 2024 15:30
Using Lima to run containers with containerd and nerdctl (without Docker Desktop) on M1 Macs

Lima (Linux virtual machines, on macOS) installation guide for M1 Mac.

Sep. 27th 2021 UPDATED

Now we can install patched version of QEMU via Homebrew (thank you everyone for the info!). Here is the updated instruction with it:

Used M1 Mac mini 2020 with macOS Big Sur Version 11.6.

1. Install QEMU & Lima

@satrobit
satrobit / xdp.md
Created August 8, 2021 16:17
Absolute Beginner's Guide to BCC, XDP, and eBPF

Introduction

If you're reading this, chances are you have some idea of eBPF and XDP. In this article, we'll write an eBPF program that will count and categorize packets based on the destination port.

eBPF

Writing low-level tracing, monitoring, or network programs in Linux is not easy. Through all the layers of the kernel, people have been squeezing every bit of performance they could get.

And that's where eBPF comes in. eBPF is basically an extended and modern variation of BPF which is like a virtual machine inside the Linux kernel. It can execute user-defined programs inside a sandbox in the kernel.

These programs can be executed in various hook points but we will focus on XDP for now.

@mitio
mitio / ebpf-and-linux-observability.md
Created July 21, 2021 11:25
eBPF and Linux observability

eBPF (or, simply BPF)

Why these tools? Why eBPF?

Linux tracing overview

linux tracing systems

But first, perf

Kubernetes and External Authentication with Rancher

Users added in Rancher get an object of kind User.

For them to be able to do anything, they need to login to Rancher and authenticate via the external AuthN provider. An instance of kind Token is then created which contains the User Principal account details:

$ kubectl describe user u-smckoeh6vq
Name:          u-smckoeh6vq
Namespace:
@shpwrck
shpwrck / envoyResources.md
Last active April 20, 2021 22:16
envoyfilters.networking.istio.io

The following list is sorted from general to specific.

(i.e. A listener contains a filter_chain which has either network filters or http filters...etc)

LISTENER:

What is a listener?

proto

@bgulla
bgulla / rke2_kubevip.md
Last active August 18, 2024 22:26
RKE2 api-server HA with Kube-VIP

On-Prem RKE2 api-server HA with Kube-VIP

               ,        ,  _______________________________
   ,-----------|'------'|  |                             |
  /.           '-'    |-'  |_____________________________|
 |/|             |    |    
   |   .________.'----'    _______________________________
   |  ||        |  ||      |                             |
   \__|'        \__|'      |_____________________________|