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: Deployment
metadata:
name: http-svc
spec:
replicas: 1
selector:
matchLabels:
app: http-svc
template:
kubectl create clusterrolebinding cluster-admin-binding --clusterrole cluster-admin --user
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- http:
paths:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: nginx-ingress-controller
labels:
k8s-app: nginx-ingress-controller
namespace: default
spec:
replicas: 1
template:
apiVersion: v1
kind: Service
metadata:
labels:
app: nginx
name: nginx
annotations:
service.beta.kubernetes.io/oci-load-balancer-shape: 400Mbps
service.beta.kubernetes.io/oci-load-balancer-subnet1: "ocid..."
service.beta.kubernetes.io/oci-load-balancer-subnet2: "ocid..."
@owainlewis
owainlewis / Nodes.md
Created May 8, 2018 17:16
Kubespray notes

Create machines

Disable swap

sudo swapoff -a

@owainlewis
owainlewis / helm-rbac.yml
Created April 30, 2018 12:25
Helm install
apiVersion: v1
kind: ServiceAccount
metadata:
name: tiller
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: tiller
kind: MySQLCluster
metadata:
name: mysql-api-production
spec:
replicas: 3
@owainlewis
owainlewis / gist:77b241a0063ddf4a9541b71323b07bc0
Created February 13, 2018 12:17
Delete all non running Kubernetes pods
kubectl get pods -a | grep -v Running | awk '{print $1}' | xargs kubectl delete pod
@owainlewis
owainlewis / Learning.md
Last active January 25, 2018 14:53
Development, programming, operations roadmap

Industry

Serverless Computing

Containers

  • Docker

Architecture