Skip to content

Instantly share code, notes, and snippets.

View sebgoa's full-sized avatar
🏠
Working from home

sebgoa

🏠
Working from home
View GitHub Profile
$ docker logs 9537c4ac872c
2016/03/31 20:04:54 Version: v1.2+7a20980
2016/03/31 20:04:54 Listening on http://:8080/expand
2016/03/31 20:07:12 expansion service: handling request:POST /expand
2016/03/31 20:07:12 expansion service:
handling request:
chart:
chartfile:
Dependencies: null
Description: Port of the replicatedservice template from kubernetes/charts
@sebgoa
sebgoa / prometheus.yml
Last active December 1, 2016 12:15
An all in one local prometheus deployment for Kubernetes
apiVersion: v1
kind: Namespace
metadata:
name: monitoring
---
kind: ConfigMap
metadata:
name: prometheus-config
namespace: monitoring
apiVersion: v1
@sebgoa
sebgoa / sidecar.md
Created October 18, 2016 18:43
How to create a kubectl proxy sidecar

building a kubectl container on linux amd64

$ wget https://storage.googleapis.com/kubernetes-release/release/v1.1.8/bin/linux/amd64/kubectl

Check the dependencies

(note, could be the latest version 1.4.0 is actually statically linked and there is no need to do the ldd shared lirbaries step).

@sebgoa
sebgoa / ingressbackend.yaml
Created December 7, 2016 18:45
ingress controller backend
# https://github.com/kubernetes/contrib/blob/master/ingress/controllers/nginx/examples/default-backend.yaml
apiVersion: v1
kind: ReplicationController
metadata:
name: default-http-backend
spec:
replicas: 1
selector:
app: default-http-backend
template:
@sebgoa
sebgoa / foobar.css
Created February 2, 2017 11:53
remark css
.remark-slide-content:after {
content: "";
position: absolute;
bottom: 10px;
left: 10px;
height: 40px;
width: 120px;
background-repeat: no-repeat;
background-size: contain;
background-image: url('data:image/png;base64,iVBORw0KGgoAA');
@sebgoa
sebgoa / scheduler.py
Created April 17, 2017 10:51
A random toy kubernetes scheduler in python
#!/usr/bin/env python
import time
import random
import json
from kubernetes import client, config, watch
config.load_kube_config()
v1=client.CoreV1Api()
@sebgoa
sebgoa / redis.yaml
Created April 17, 2017 10:52
A redis Pod with a non-default scheduler
apiVersion: v1
kind: Pod
metadata:
name: foobar-sched
spec:
schedulerName: foobar
containers:
- name: redis
image: redis
@sebgoa
sebgoa / seed.yaml
Created May 2, 2017 11:25
Seed job to load inception model
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: seed
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 500Mi
@sebgoa
sebgoa / tensorflow.yaml
Last active May 2, 2017 11:34
tensorflow k8s deployment
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: tensorflow-serving
spec:
replicas: 1
template:
metadata:
labels:
app: tf
@sebgoa
sebgoa / wordpress.yml
Created May 17, 2017 13:01
wordpress docker-compose
version: '2'
services:
mariadb:
image: 'bitnami/mariadb:latest'
volumes:
- 'mariadb_data:/bitnami/mariadb'
environment:
- MARIADB_USER=bn_wordpress
- MARIADB_DATABASE=bitnami_wordpress
- ALLOW_EMPTY_PASSWORD=yes