Skip to content

Instantly share code, notes, and snippets.

View richardcase's full-sized avatar

Richard Case richardcase

View GitHub Profile
@richardcase
richardcase / README.md
Last active February 6, 2024 10:44
Rancher Turtles: Remove a cluster from Rancher Manager

Also called un-importing

  1. In Rancher Manager go to Cluster Management
  2. Tick the box next to cluster1-capi
  3. Click the Delete button
  4. Type cluster1-capi in the text box
  5. Click the Delete button
  6. Run the following command to check that the CAPI cluster hasn't been deleted:
@richardcase
richardcase / README.md
Created February 6, 2024 10:48
Rancher Turtles: Destroy child/workload cluster
  1. In Rancher Manager got to Continuos Delivery
  2. Click Git Repos from the left navigation
  3. Change the namespace to fleet-local using the dropdown on the top bar
  4. Click the "3 dots" on the line for clusters
  5. Select Delete from the menu
  6. Click Delete button
  7. Wait until the following returns no clusters found:
kubectl get clusters.cluster.x-k8s.io
@richardcase
richardcase / main.go
Created February 9, 2024 06:27
SSH Client
package main
import (
"fmt"
"io/ioutil"
"log"
"net"
"os"
"time"
@richardcase
richardcase / configuration.nix
Created February 10, 2024 10:47
NixOs - Start
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
## template: jinja
#cloud-config
runcmd:
- echo 'Running on {{ v1.cloud_name }}' > /var/tmp/cloud_name
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
labels:
ccm: external
csi: external
name: "richtest2"
spec:
clusterNetwork:
pods:
/*
Copyright 2022 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
apiVersion: v1
kind: Namespace
metadata:
labels:
cluster.x-k8s.io/provider: bootstrap-k3s
control-plane: controller-manager
name: capi-k3s-bootstrap-system
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition