Skip to content

Instantly share code, notes, and snippets.

View richardcase's full-sized avatar

Richard Case richardcase

View GitHub Profile
@richardcase
richardcase / local-ngrok.md
Last active April 10, 2026 15:22
Rancher - run locally

Run Rancher Locally with Ngrok

  • Install k3s and k3d locally
k3d cluster create rancher-test
  • Install cert manager
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.1/cert-manager.crds.yaml
@richardcase
richardcase / README.md
Created June 26, 2023 14:44
Crossplane EKS

Steps

  1. Create file with the AWS creds called aws-creds.conf
aws_access_key_id = <AWS_ACCESS_KEY_I>
aws_secret_access_key = <AWS_SECRET_ACCESS_KE>

Create the secret:

@richardcase
richardcase / main.go
Created July 4, 2023 11:02
CEL & CAPI WatchFilter
package main
import (
"log"
"github.com/google/cel-go/cel"
)
func main() {
env, err := cel.NewEnv(
@richardcase
richardcase / manager server
Last active January 30, 2024 19:18
44245
sudo INSTALL_RKE2_VERSION=v1.26.10+rke2r2 ./install.sh
sudo systemctl enable –now rke2-server
helm repo add rancher-latest https://releases.rancher.com/server-charts/latest
helm repo add jetstack https://charts.jetstack.io
helm repo update
sudo cp /etc/rancher/rke2/rke2.yaml .
sudo chmod a+rw rke2.yaml
export KUBECONFIG=/home/richard/rke2.yaml
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.1/cert-manager.crds.yaml
helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --version v1.5.1
@richardcase
richardcase / README.md
Last active February 5, 2024 15:07
Rancher Turtles: Install latest UI extenion

Install Rancher Turtles UI Extension

  1. In the side bar click Extensions
  2. Click Enable
  3. On the Enable Extension Support popup select OK
  4. Wait for the Extensions screen to load, it should have the Installed, Available, Updates and All tabs
  5. Click the the "3 dots" button to the right and click Manage Repositories
  6. Click Create
  7. Enter the following:
  • Name: turtlesui
@richardcase
richardcase / README.md
Last active February 6, 2024 10:18
Rancher Turtles: Create cluster via GitOps with namespace annotation

This assumes that that previous test steps have been executed. These instructions will be updated when annotating the namespaces works from the UI extension.

  1. Run the following command to annotate the default namespace for auto import
kubectl label namespace default cluster-api.cattle.io/rancher-auto-import=true
  1. In Rancher Manager go to Continous Delivery
  2. Using the namespace drop down in the top bar select fleet-local
  3. Click Git Repos on the left navigation
@richardcase
richardcase / README.md
Last active February 6, 2024 09:50
Rancher Turtles: Create cluster via GitOps with cluster annotation

These steps assume that the previous test scenarios have been done.

  1. In Rancher Manager go to Continous Delivery
  2. Using the namespace drop down in the top bar select fleet-local
  3. Click Git Repos on the left navigation
  4. Click Add Repository button
  5. Fill in the following information:
  • Name: clusters
  • Repository URL: https://github.com/rancher-sandbox/rancher-turtles-fleet-example
  • Branch Name: per-cluster-import
@richardcase
richardcase / README.md
Last active April 5, 2024 08:33
Rancher Turtles: Installation of backend

This assumes you have a Rancher Manage v2.8.0 cluster running in kind with the docker socket shared (see this).

  1. Create a new file called feature.yaml with this content:
apiVersion: management.cattle.io/v3
kind: Feature
metadata:
  name: embedded-cluster-api
spec:
@richardcase
richardcase / README.md
Last active April 5, 2024 08:30
Rancher Turtles: Setup Rancher Manager using kind
  1. Create a file called kind-cluster-with-extramounts.yaml with the following contents
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: rancher-manager
nodes:
- role: control-plane
  image: kindest/node:v1.26.3
 extraMounts:
@richardcase
richardcase / README.md
Created February 6, 2024 10:35
Rancher Turtles: Scale existing imported cluster using GitOps

These steps assume you have followed the steps to import a cluster

  1. Open the samples repo (or your own fork): https://github.com/rancher-sandbox/rancher-turtles-fleet-example/tree/main
  2. Got to the clusters folder
  3. Edit cluster1.yaml:
  • Find the MachineDeployment
  • Change Replicas from 1 to 2
  1. Commit the change
  2. In Rancher Manager go to Cluster Management
  3. Explore cluster1-capi