Skip to content

Instantly share code, notes, and snippets.

View marcelmaatkamp's full-sized avatar
🚢
Available

Marcel Maatkamp marcelmaatkamp

🚢
Available
View GitHub Profile
$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/kind/deploy.yaml
$ kubectl port-forward --address 0.0.0.0 -n ingress-nginx service/ingress-nginx-controller 8443:443
@marcelmaatkamp
marcelmaatkamp / docker-compose.yml
Created June 27, 2021 16:51
traefik dashboard
version: '3'
services:
reverse-proxy:
image: traefik:v2.3.4
command:
# Docker swarm configuration
- "--providers.docker.endpoint=unix:///var/run/docker.sock"
- "--providers.docker.swarmMode=true"
- "--providers.docker.exposedbydefault=false"

traefik

$ \
  kubectl create namespace traefik &&\
  kubectl apply -f - <<EOF
---
apiVersion: v1
kind: Secret
metadata:
  name: cloudflare-api-credentials

traefik

$ \
  kubectl create namespace traefik &&\
  kubectl apply -f - <<EOF
---
apiVersion: v1
kind: Secret
metadata:
  name: cloudflare-api-credentials

k0s

The simpeest way to install kubernetes is via https://k0sproject.io

install

$ \
  curl -sSLf https://get.k0s.sh | sudo sh

start 'controller + worker' as system service

$ \
  curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 &&\
  sudo install minikube-linux-amd64 /usr/local/bin/minikube

$ # minikube via docker
$ # -------------------
$ \
  minikube start
FROM marcelmaatkamp/cosmopolitan as cosmopolitan
FROM ubuntu
ENV DEBIAN_FRONTEND=noninteractive
RUN \
apt-get update && apt-get install -yf \
make \
autoconf \
automake \
zip \
#!/bin/bash
gcc \
-I/usr/local/include -g -Os -static -nostdlib -nostdinc -fno-pie -no-pie -mno-red-zone -fno-omit-frame-pointer -pg -mnop-mcount\
conftest.c -o conftest.dbg\
-fuse-ld=bfd -Wl,-T,/cosmopolitan/ape.lds -include /cosmopolitan/cosmopolitan.h /cosmopolitan/crt.o /cosmopolitan/ape.o /cosmopolitan/cosmopolitan.a
@marcelmaatkamp
marcelmaatkamp / build.sh
Last active June 11, 2021 14:40
cosmopolitan: ./configure flags
./configure \
CFLAGS="-I/usr/local/include -include /cosmopolitan/cosmopolitan.h -g -Os -static -nostdlib -nostdinc -fno-pie -no-pie -mno-red-zone -fno-omit-frame-pointer -pg -mnop-mcount" \
CPPFLAGS="-I/usr/local/include -include /cosmopolitan/cosmopolitan.h -g -Os -static -nostdlib -nostdinc -fno-pie -no-pie -mno-red-zone -fno-omit-frame-pointer -pg -mnop-mcount" \
LIBS="-fuse-ld=bfd -Wl,-T,/cosmopolitan/ape.lds -include /cosmopolitan/cosmopolitan.h /cosmopolitan/crt.o /cosmopolitan/ape.o /cosmopolitan/cosmopolitan.a"
@marcelmaatkamp
marcelmaatkamp / nim.cfg
Created June 1, 2021 05:44
cosmppolitan nim compile options
# from https://github.com/Yardanico/cosmonim/blob/master/nim.cfg
--os:linux
# --gc:arc - Not required, but I prefer ARC/ORC over refc for things like this
# Define cosmLibc so we can patch stdlib easier
-d:cosmLibc
--passC:"-Istubs -Icosmopolitan"
--passC:"-static -nostdlib -nostdinc -fno-pie -no-pie -mno-red-zone -include cosmopolitan.h"