Skip to content

Instantly share code, notes, and snippets.

View yankcrime's full-sized avatar
🤠
┬──┬◡ノ(° -°ノ)

Nick Jones yankcrime

🤠
┬──┬◡ノ(° -°ノ)
View GitHub Profile
@yankcrime
yankcrime / lima-macos-shared-networking.md
Last active November 10, 2022 19:37
Lima and shared networking on macOS

Configuring Lima to use shared networking on macOS with socket_vmnet

Install https://github.com/lima-vm/socket_vmnet:

% git clone https://github.com/lima-vm/socket_vmnet.git
% cd socket_vmnet
% sudo make PREFIX=/opt/socket_vmnet install
@yankcrime
yankcrime / pve-lxc-quicksync-transcode.md
Last active September 20, 2022 09:02
Intel QuickSync accelerated video in Docker via LXC on PVE

Transcoding via Intel Quicksync in an Docker container under LXC on PVE

For Reasons™ I run Plex in a Docker container in LXC on Proxmox. Here's some configuration notes on making it work.

LXC container creation

  • It needs to be a privileged container
  • Needs to have nesting enabled

Once the container has been created, you need to manually add the following options to the container's configuration file (/etc/pve/lxc/<id>.conf):

@yankcrime
yankcrime / helmcontroller.yaml
Last active July 25, 2022 19:31
K3s Helm Controller deployment definition
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: helmchartconfigs.helm.cattle.io
namespace: kube-system
spec:
group: helm.cattle.io
names:
categories:
- helm
@yankcrime
yankcrime / rke2-commands.md
Created May 19, 2022 07:37 — forked from superseb/rke2-commands.md
RKE2 commands

RKE2 commands

Install

curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
@yankcrime
yankcrime / azure-external-cp-rke.md
Last active February 11, 2022 21:02
Configuring RKE with the Azure out-of-tree external Cloud Provider
@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"
@yankcrime
yankcrime / longhorn-cilium-cew.md
Last active August 12, 2021 09:25
External iSCSI initiator to Longhorn via Cilium's CEW feature

Cluster external iSCSI initiator to Longhorn volume target, via Cilium's CEW feature

With Cilium's Cluster External Workload feature it's possible to attach clients outside of the cluster to Longhorn volumes presented via iSCSI. This example uses RKE.

Cluster bring-up

I've created four virtual machines for my cluster - one as a controlplane / etcd host, and three workers:

cluster_name: cilium
loki:
persistence:
enabled: true
size: 10Gi
serviceMonitor:
enabled: true
apiVersion: logging.banzaicloud.io/v1beta1
kind: ClusterOutput
metadata:
name: loki
namespace: cattle-logging-system
spec:
loki:
url: http://loki.loki:3100
configure_kubernetes_labels: true
---
@yankcrime
yankcrime / azure.md
Last active July 1, 2021 08:55
Azure CLI

Azure CLI foo

List available locations:

az account list-locations | grep uk

List VM images from Canonical: