Skip to content

Instantly share code, notes, and snippets.

@lalyos
lalyos / dinner.json
Created December 3, 2019 15:33
dinner poc
{
"orders":[
{
"id": 1,
"user": "lalyos",
"food": "pacal"
},
{
"id": 2,
"user": "geza",
@lalyos
lalyos / 0README.md
Last active November 28, 2019 22:37
Kustomize illustrated

Kustomize illustrated

Its much easier to understand how kustomize work if you see some pictures ...

@lalyos
lalyos / 00-k8s-prompt.md
Last active January 3, 2021 14:39
simple shell based prompt generated with promptline.vim

Sometimes a very simple prompt is useful - like creating documentation, or github issues. In those cases its still important to be able to tell the k8s context/ns

white [ctx/ns]

PS1='[$(kubectl config view --minify -o jsonpath="{.contexts[0].name}:{.contexts[0].context.namespace}")]$ '

orange [ns]

@lalyos
lalyos / 0-json-server-ui.md
Last active October 15, 2020 17:24
sample issues.json to be used with https://github.com/lalyos/docker-json-server

Fake/Quick rest api prototype by combinig:

docker run -d \
  --name json-server \
  -p 3000:3000 \
  lalyos/json-server https://gist.githubusercontent.com/lalyos/2be21105e3607b4981c85a542cedc7fc/raw/issues.json
@lalyos
lalyos / README.md
Last active July 31, 2019 20:53
k8s basic auth for nginx ingress
apiVersion: apps/v1
kind: Deployment
metadata:
name: bad-app
spec:
replicas: 0
selector:
matchLabels:
app: bad
template:
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
app: lunch
name: lunch
spec:
type: NodePort
ports:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: web
spec:
rules:
- host: web.$NS.ing.k8z.eu
http:
paths:
- backend:
@lalyos
lalyos / list-fonts.md
Last active June 20, 2019 15:09
mac osx list fonts from cli

listing osx fonts from cli:

curl -LO https://gist.githubusercontent.com/lalyos/eca62800093d9352474ad5140f6d1f0f/raw/list-fonts.swift
chmod +x list-fonts.swift
./list-fonts.swift

tldr; installing fonts via brew:

@lalyos
lalyos / docker-compose.yml
Created May 13, 2019 15:25
2 node k3s cluster
version: '3'
services:
server:
# v0.2.0-rc5
# v0.1.0-rc1
image: rancher/k3s:v0.5.0
command: server --disable-agent
environment:
- K3S_CLUSTER_SECRET=somethingtotallyrandom
- K3S_KUBECONFIG_OUTPUT=/output/kubeconfig.yaml