Skip to content

Instantly share code, notes, and snippets.

View eumel8's full-sized avatar
๐Ÿ™‚

Frank Kloeker eumel8

๐Ÿ™‚
View GitHub Profile
@eumel8
eumel8 / rancher_migrate.md
Last active May 3, 2022 09:22
Howto migrate RKE downstream cluster from one seed cluster to another with another URL

Howto migrate RKE downstream cluster from one seed cluster to another with another URL

  1. Assume you have 2 Rancher instances with the same Rancher version and the same underlying Kubernetes Infrastructur
  2. Install rancher-backup on both Rancher instances
  3. Perform a backup on the source instance. Best way to use S3 storage for easy migration. For this create a Secret with the S3 credentials
  4. Restore the backup on the destination instance. EXTRA WARNINGS:
    • This step will import all clusters, nodes, users, tokens.
    • Rancher settings will be overwritten from the source instance, incl. admin user, 3th party auth like Keycloak, UI layout
  • If restore task isn't completed, it will retry in a loop. You may observe restart loops of Rancher PODs which is caused by the restore process. Look at the cattle-resource-system namespace in rancher-backup POD logs. In any case the restore should stopped or with kubectl delete restore deleted
@eumel8
eumel8 / otc_token.go
Created April 28, 2022 19:16
otc_token.go
package main
// get a token with project scope "eu-de"
import (
"fmt"
gophercloud "github.com/opentelekomcloud/gophertelekomcloud"
"github.com/opentelekomcloud/gophertelekomcloud/openstack"
"github.com/opentelekomcloud/gophertelekomcloud/openstack/identity/v3/tokens"
package daemonset
import (
"context"
"testing"
apps "k8s.io/api/apps/v1"
core "k8s.io/api/core/v1"
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes/fake"
package pod
import (
"context"
"testing"
core "k8s.io/api/core/v1"
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes/fake"
)

how to sign 3th party binaries on MacOS with Gon

Gon is a tool to manage code signing without Apples Xcode app withing the Apple Developer portal. There are alreay a good explanation in the project repo. To verify here the step by step procedure

  1. Download and install the program with brew:
$ brew tap mitchellh/gon
$ brew install mitchellh/gon/gon
@eumel8
eumel8 / notary.md
Last active May 31, 2020 17:40
How to make trust with Yubikey
@eumel8
eumel8 / ingress.yaml
Last active May 16, 2020 15:25
Helm template for httpasswd user in Kubernetes Ingress
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: {{ $.Values.Name }}
annotations:
kubernetes.io/ingress.class: nginx
external-dns.alpha.kubernetes.io/target: {{ $.Values.ClusterName }}
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/affinity: cookie
```plantuml
title Train QA
actor "Traveller" as traveller
participant "DB station realtime API" as db
participant "Data collector" as trains2
participant "Google Spreadsheet" as google
participant "Tableau data viz" as tableau
@eumel8
eumel8 / 01-youtube.md
Last active December 2, 2018 23:09
Create Youtube Playlist montly Top 50 Music
@eumel8
eumel8 / 12-factor-app-de.html
Last active April 8, 2018 11:28
12_factor_app_scroller
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<!-- CSS Code -->
<style type="text/css" scoped>
.GeneratedMarquee {
font-family:Arial, sans-serif;
font-size:2em;