Skip to content

Instantly share code, notes, and snippets.

View owainlewis's full-sized avatar

Owain Lewis owainlewis

View GitHub Profile
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: example-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: hello-world.info
http:
@owainlewis
owainlewis / GPG.md
Last active April 18, 2019 08:12
GPG Tutorial

Quick Guide to using GPG

❯ gpg --gen-key

List keys

❯ gpg --list-keys
@owainlewis
owainlewis / auth.txt
Last active November 7, 2018 16:40
Flexvolume notes
➜ oci-kubeadm git:(master) ✗ cat manifests/flexvolume-config.yaml
---
auth:
region: us-phoenix-1
tenancy: ocid1.tenancy.oc1..
compartment: ocid1.compartment.oc1..
user: ocid1.user.oc1..
key: |
-----BEGIN RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----
## =====================================
## Base configuration used by all plugins
## =====================================
auth:
region: us-phoenix-1
tenancy: ocid1.tenancy.oc1..
user: ocid1.user.oc1..
key: |
-----BEGIN RSA PRIVATE KEY-----
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: oci-flexvolume-driver-master
namespace: kube-system
spec:
selector:
matchLabels:
component: oci-flexvolume-driver
@owainlewis
owainlewis / setup.sh
Last active March 15, 2020 00:18
Setup Ubuntu 18.04 development machine
sudo apt update && apt upgrade -y
# Install core packages
sudo apt install -y build-essential libncurses-dev git emacs zsh gnome-tweak-tool curl
# Setup Git user information
git config --global user.email "[email protected]"
git config --global user.name "Owain Lewis"
@owainlewis
owainlewis / flannel-patch.yaml
Last active November 2, 2018 17:44
VXLAN patch for Flannel networking
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: flannel
rules:
- apiGroups:
- ""
resources:
- pods
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 1
template:
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: oci-block-volume
spec:
storageClassName: oci
selector:
matchLabels:
failure-domain.beta.kubernetes.io/zone: AD-1
accessModes:
@owainlewis
owainlewis / ETCD.sh
Last active October 10, 2018 10:20
Kubernetes kubeadm notes
# Exec into Kubernetes docker image on the master
# docker exec -it $ID sh
ETCDCTL_API=3 etcdctl --cacert=/etc/kubernetes/pki/etcd/ca.crt \
--cert=/etc/kubernetes/pki/etcd/peer.crt \
--key=/etc/kubernetes/pki/etcd/peer.key \
get /registry/namespaces/default -w=json