Skip to content

Instantly share code, notes, and snippets.

View curx's full-sized avatar

Thorsten Schifferdecker curx

View GitHub Profile
#!/bin/bash
export PATH=./:$PATH
# Determine OS and architecture
case $(uname -s) in
Linux*) os="linux" ;;
Darwin*) os="darwin" ;;
*) echo "Unsupported OS detected"; exit;;
esac
@curx
curx / docker-compose.yaml
Created October 9, 2021 16:04
a simple docker-compose with a nginx webserver
# a simple dockerized nginx webserver
version: '3'
services:
webserver:
container_name: webserver
image: docker.io/library/nginx:1.21-alpine
ports:
- 80:80
volumes:
@curx
curx / calico.yaml
Last active June 2, 2021 18:30
a prepared calico.yaml for k3s
---
# Source: calico/templates/calico-config.yaml
# This ConfigMap is used to configure a self-hosted Calico installation.
kind: ConfigMap
apiVersion: v1
metadata:
name: calico-config
namespace: kube-system
data:
# Typha is disabled.
@garethr
garethr / kubernetes.rego
Last active June 23, 2025 13:04
Collecting together Kubernetes rego examples, including porting the https://kubesec.io rules to rego
package kubernetes
name = input.metadata.name
kind = input.kind
is_service {
kind = "Service"
}
@alexellis
alexellis / inlets-kind.md
Last active January 19, 2021 07:19
Expose Kubernetes ClusterIP services with inlets.dev

KinD with inlets.dev

Expose Kubernetes ClusterIP services with inlets.dev

Get KinD:

# Linux

sudo curl -Lo /usr/local/bin/kind \
@curx
curx / registry.yml
Created December 30, 2018 18:41
rancher-service-registry.yaml
# RancherOS
# (docker) container registry as service
registry:
restart: always
image: registry:latest
ports:
- "5000:5000"
volumes:
- /opt/registry-data:/var/lib/registry:rw
environment:
@harishkannarao
harishkannarao / youtube-dl.md
Last active March 11, 2024 10:23
youtube-dl

youtube-dl

youtube-dl is an opensource command line tool to download video or audio from online video streaming services.

Videos downloaded in mkv or webm extensions can be played by VLC Media player in all major devices and operating systems including iPhone, Android devices.

Tool website: https://youtube-dl.org/

This gist shows the example commands to use the tool and doesn't support or encourage piracy or violation of copyrights of the online streaming service or the author of the content

Installing youtube-dl:

@janeczku
janeczku / 00-cloud-config.yml
Last active December 2, 2024 01:28
Annotated RancherOS Cloud-init configuration snippets
#cloud-config
# Set the hostname for this machine (takes precedence over hostname assigned by DHCP lease).
hostname: myhost
# Authorize SSH keys for the `rancher` sudoer user
ssh_authorized_keys:
- ssh-rsa AAA...ZZZ example1@rancher
@curx
curx / metrics-server-rancher20.md
Created June 29, 2018 04:19 — forked from superseb/metrics-server-rancher20.md
Enabling metrics-server on Rancher 2.0

Enabling metrics-server on Rancher 2.0

Create cluster via API

This will be properly fixed in rancher/rancher#13745, until then, you can enable it by re-using the kube-proxy certificate.

curl -s 'https://your_rancher_server/v3/cluster' -H 'content-type: application/json' -H "Authorization: Bearer your_bearer_token" --insecure --data-binary '{ "type": "cluster", "googleKubernetesEngineConfig": null, "name": "metrics", "rancherKubernetesEngineConfig": { "ignoreDockerVersion": true, "sshAgentAuth": false, "type": "rancherKubernetesEngineConfig", "kubernetesVersion": "v1.10.1-rancher1", "authentication": { "type": "authnConfig", "strategy": "x509" }, "network": { "type": "networkConfig", "plugin": "canal" }, "ingress": { "type": "ingressConfig", "provider": "nginx" }, "services": { "type": "rkeConfigServices", "kubeApi": { "podSecurityPolicy": false, "type": "kubeAPIService", "extraArgs": { "requestheader-client-ca-file": "/etc/kubernetes/ssl/kube-ca.pem", "requestheader-ext
@superseb
superseb / metrics-server-rancher20.md
Last active April 23, 2020 20:38
Enabling metrics-server on Rancher 2.0

Enabling metrics-server on Rancher 2.0

IMPORTANT: metrics-server is included by default in custom clusters in Rancher v2.0.7 and higher, these steps are not needed when clusters are created using Rancher v2.0.7 or higher.

Create cluster via Edit as YAML in custom cluster

  kube_api: 
    pod_security_policy: false
    extra_args: