Skip to content

Instantly share code, notes, and snippets.

View thyarles's full-sized avatar
:octocat:
Together we can do way more.

Charles Santos thyarles

:octocat:
Together we can do way more.
View GitHub Profile
@thyarles
thyarles / rke2-commands.md
Created June 14, 2024 19:44 — forked from superseb/rke2-commands.md
RKE2 commands

RKE2 commands

  • Updated on May 29 to accommodate etcd container not having /bin/sh available anymore.

Install

curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
@thyarles
thyarles / rancher-fix-waiting-for-probes-controller-manager-cert.sh Script to fix rancher managed RKE2 clusters stuck in "Waiting for probes: kube-controller-manager, kube-scheduler"
export CRI_CONFIG_FILE=/var/lib/rancher/rke2/agent/etc/crictl.yaml
export CONTAINERD_ADDRESS=unix:///run/k3s/containerd/containerd.sock
export PATH=$PATH:/var/lib/rancher/rke2/bin
echo "=== CHECK BEFORE ==="
(
curl --cacert /var/lib/rancher/rke2/server/tls/kube-controller-manager/kube-controller-manager.crt \
https://127.0.0.1:10257/healthz >/dev/null 2>&1 \
&& echo "[OK] Kube Controller probe" \
|| echo "[FAIL] Kube Controller probe";
@thyarles
thyarles / vim-cheatsheet.md
Created June 14, 2024 17:39 — forked from azadkuh/vim-cheatsheet.md
vim / vimdiff cheatsheet - essential commands

Vim cheat sheet

Starting Vim

vim [file1] [file2] ...

@thyarles
thyarles / default.vcl
Created May 17, 2023 20:15 — forked from danielpotthast/default.vcl
Varnish Konfiguration
vcl 4.0;
# Default backend definition. Set this to point to your content server.
backend default {
.host = "127.0.0.1";
.port = "8080";
.connect_timeout = 600s;
.first_byte_timeout = 600s;
.between_bytes_timeout = 600s;
}
@thyarles
thyarles / import_json_appsscript.js
Created March 5, 2020 18:22 — forked from chrislkeller/import_json_appsscript.js
Adds what amounts to an =ImportJSON() function to a Google spreadsheet... To use go to Tools --> Script Editor and add the script and save.
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@thyarles
thyarles / cleanup.sh
Created June 22, 2018 21:28 — forked from superseb/cleanup.sh
Cleanup host added as custom to Rancher 2.0
#!/bin/sh
docker rm -f $(docker ps -qa)
docker volume rm $(docker volume ls -q)
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico"
for dir in $cleanupdirs; do
echo "Removing $dir"
rm -rf $dir
done