NOTE THIS IS NOT SECURE FOR A PRODUCTION ENVIRONMENT, use for development/test only.
kubectl exec
into the Rancher pod, then:
curl -k -o sqlite-tools.zip https://www.sqlite.org/2025/sqlite-tools-linux-x64-3500400.zip
unzip sqlite-tools.zip
#!/bin/bash | |
# This script automates copies the Vai DBs from Rancher to local machine. | |
# NOTE THIS IS NOT SECURE FOR A PRODUCTION ENVIRONMENT, use for development/test only | |
# Exit immediately if a command exits with a non-zero status. | |
set -e | |
# --- Configuration --- |
package main | |
import ( | |
"fmt" | |
"log" | |
"gorm.io/driver/sqlite" | |
"gorm.io/gorm" | |
) |
import sys | |
import csv | |
from datetime import datetime | |
# Replaces a CSV column reformatting the date according to ISO 8601 standard with millis | |
# Usage: python fix_date_format.py < input.csv > output.csv | |
COLUMN_TO_REFORMAT_INDEX = 0 | |
INPUT_FORMAT = '%d.%m.%Y, %H:%M:%S.%f' |
#!/bin/bash | |
set -euo pipefail | |
# Global variables | |
KUBECONFIG="../tofu/main/k3d/config/upstream.yaml" | |
CONTEXT="k3d-st-upstream" | |
KUBERNETES_BASE_URL="https://localhost:6445" | |
STEVE_BASE_URL="https://localhost:8444" | |
USERNAME="admin" |
#!/bin/bash | |
# Azure storage container SAS URL and token for uploading. Only creation permission is necessary | |
BLOB_URL='' | |
BLOB_TOKEN='' | |
cleanup() { | |
echo "Cleaning up..." | |
echo "Setting rancher logs back to error" | |
kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns=name:.metadata.name | while read rancherpod; do kubectl -n cattle-system exec $rancherpod -c rancher -- loglevel --set error; done |
import { check, fail } from 'k6'; | |
import http from 'k6/http'; | |
// Parameters | |
const vus = __ENV.VUS || 1 | |
const perVuIterations = __ENV.PER_VU_ITERATIONS || 30 | |
const baseUrl = __ENV.BASE_URL | |
const user = __ENV.USER | |
const password = __ENV.PASSWORD | |
const cluster = __ENV.CLUSTER || "local" |
Grab a kubeconfig file pointing to the Rancher upstream cluster, then copypaste:
export KUBECONFIG=/path/to/the/upstream_cluster.yaml
for pod in $(kubectl get pods -n cattle-system --no-headers -l app=rancher | cut -d ' ' -f1); do
echo Collecting 30s worth of profile data for $pod...
kubectl exec -n cattle-system $pod -- curl -s http://localhost:6060/debug/pprof/profile -o profile
#!/usr/bin/env ruby | |
# encoding: UTF-8 | |
# EXAMPLE | |
# | |
# { | |
# "kind": "Event", | |
# "apiVersion": "audit.k8s.io/v1", | |
# "level": "Metadata", | |
# "auditID": "f6618a15-8e4f-4f82-95b3-7592ed544eb9", |