Skip to content

Instantly share code, notes, and snippets.

View AlexsJones's full-sized avatar
🧟‍♀️

Alex Jones AlexsJones

🧟‍♀️
View GitHub Profile
@AlexsJones
AlexsJones / run.sh
Created March 27, 2025 15:49
try k8sgpt with kind
#!/bin/bash
# Default values, can be overridden with environment variables or command-line args
KIND_CLUSTER_NAME="${KIND_CLUSTER_NAME:-k8sgpt-cluster}"
HELM_RELEASE_NAME="${HELM_RELEASE_NAME:-k8sgpt}"
NAMESPACE="${NAMESPACE:-k8sgpt}"
OPENAI_TOKEN="${OPENAI_TOKEN:-}"
# Check for OpenAI token
if [[ -z "$OPENAI_TOKEN" ]]; then
@AlexsJones
AlexsJones / workspaces-linux-client-rpm.md
Created August 7, 2024 16:03 — forked from nhira/workspaces-linux-client-rpm.md
How to install Amazon Workspaces Linux Client for Fedora

Amazon WorkSpaces Linux client - RPM installation

Overview

The good news is that there is an Amazon WorkSpaces Linux client. If you happen to use Ubuntu, you can use the official instructions from the documentation. But what if you're on an rpm-friendly distribution like Fedora or CentOS?

alien to the rescue.

How to

You can use these steps to build a PCoIP client (not the 2023 WSP client) RPM from the original .deb package.

@AlexsJones
AlexsJones / README.md
Created January 10, 2024 17:27
Fix neovim on maca

Install .rustup directory in home, otherwise there are a bunch of rust-analyzer issues

@AlexsJones
AlexsJones / cp-0
Created March 6, 2023 08:34
DQLite debugging
ubuntu@raspbernetes-0:~/dqlite-issue-repro$ cat /var/snap/microk8s/current/var/kubernetes/backend/cluster.yaml
- Address: 192.168.88.239:19001
ID: 3297041220608546238
Role: 0
- Address: 192.168.88.249:19001
ID: 10829805846545420511
Role: 0
- Address: 192.168.88.246:19001
ID: 8819719984785607608
Role: 0

hardware

  • pi4 x3 control-plane nodes
  • pi4 x1 worker nodes
  • Attached disks on /dev/sda on each node

Install

I don't think I enabled coreDNS by default

You must run these commands on all nodes, including the workers ( especially cgroup enablement for containerd )

sudo swapoff -a
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
#!/bin/sh
set -e
set -o noglob
# Usage:
# curl ... | ENV_VAR=... sh -
# or
# ENV_VAR=... ./install.sh
#
# Environment variables:
@AlexsJones
AlexsJones / install.sh
Created November 10, 2022 10:20
Single node kubeadm based k8s
#!/bin/bash
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl
curl -fsSLo containerd-config.toml \
https://gist.githubusercontent.com/oradwell/31ef858de3ca43addef68ff971f459c2/raw/5099df007eb717a11825c3890a0517892fa12dbf/containerd-config.toml
sudo mkdir /etc/containerd
sudo mv containerd-config.toml /etc/containerd/config.toml
curl -fsSLo containerd-1.5.13-linux-amd64.tar.gz \
@AlexsJones
AlexsJones / README.md
Last active November 10, 2022 17:15
klustered
  1. Stop containerd
sudo systemctl stop containerd
sudo systemctl disable containerd
  1. Alias
@AlexsJones
AlexsJones / gist:0c68632887ee40c36a8cc37ee1451ce4
Created August 7, 2022 16:40
webhook configuration with kubebuilder
```
kubebuilder init --domain=XXXXXXXXXX: use the rest of the flags as needed (e.g. --license or --owner).
kubebuilder create api --resource=false --controller=false --group=core --version=v1 --kind=Pod: use the rest of the flags as needed.
kubebuilder create webhook --group=core --version=v1 --kind=Pod ...: extra flags will be needed here
```