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
@AlexisDucastel
AlexisDucastel / rancher-fix-waiting-for-probes-controller-manager-cert.sh
Last active June 17, 2024 15:14
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";
@superseb
superseb / rke2-commands.md
Last active July 23, 2024 17:02
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
package main
import (
"fmt"
"net/http"
"os"
"statsd"
"time"
"github.com/thedevsaddam/gojsonq"
@azadkuh
azadkuh / vim-cheatsheet.md
Last active July 10, 2024 18:27
vim / vimdiff cheatsheet - essential commands

Vim cheat sheet

Starting Vim

vim [file1] [file2] ...

@reinholdsson
reinholdsson / server.R
Last active January 6, 2023 12:07
Shiny + Redis example
library(rredis)
shinyServer(function(input, output) {
output$show <- renderText({
redisConnect()
res <- redisGet(input$key)
redisClose()
return(res)
})