Skip to content

Instantly share code, notes, and snippets.

@dcasati
dcasati / kube-dns-port-forward.sh
Last active October 21, 2024 19:46
kubernetes - Kube-DNS port forwarding and DNS querying.
# Use dig to find out about the k8s records
# dig +vc -p 5300 @127.0.0.1 cluser.local
# Use dig to retrieve an A Record
# dig +vc -p 5300 @127.0.0.1 A cb-example-0000.default.svc.cluster.local
# Use dig to do a reverse lookup (-x flag)
#dig +vc -p 5300 @127.0.0.1 -x 10.0.50.156
# Add the port forward
@bendera
bendera / multimon.lua
Last active December 12, 2024 13:42
Multi-monitor devilspie2 config
-- https://www.howtoforge.com/tutorial/ubuntu-desktop-devilspie-2/
debug_print("--------------------------------------------------------------------------------")
debug_print("Window Name: ".. get_window_name());
debug_print("Application name: "..get_application_name())
debug_print("--------------------------------------------------------------------------------")
editor_workspace = 1
browser_workspace = 2
terminal_workspace = 1
@dreampuf
dreampuf / main.go
Last active December 28, 2023 06:46
Golang SSHAgent Usage Example
package main
/*
Golang SSHAgent Usage
https://orebibou.com/2019/03/golang%E3%81%A7ssh-agent%E3%81%8B%E3%82%89%E9%8D%B5%E3%82%92%E5%8F%96%E5%BE%97%E3%81%97%E3%81%A6ssh%E6%8E%A5%E7%B6%9A%E3%81%99%E3%82%8B/
*/
import (
"fmt"
"golang.org/x/crypto/ssh"
@superseb
superseb / rke2-commands.md
Last active June 24, 2025 12:10
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
@rkspx
rkspx / config.go
Last active October 18, 2024 23:06
Custom marshal YAML file in golang
package config
import (
"errors"
"io/ioutil"
"gopkg.in/yaml.v2"
)
type Config struct {

How to disable Kube-Proxy in RKE2

Example use case: Running the Cilium CNI without any kube-proxy

On all RKE2 servers (master nodes), add the following configuration to your /etc/rancher/rke2/config.yaml file:

disable-kube-proxy: "true"

Now the important step: If you already had stared the RKE2 service before (without this flag and with kube-proxy enabled), ensure to also delete the kube-proxy.yaml static pod manifest: