Skip to content

Instantly share code, notes, and snippets.

View jakexks's full-sized avatar

Jake Sanders jakexks

View GitHub Profile
@jakexks
jakexks / master.yaml
Created June 12, 2015 16:19
User-data for Kubernetes on Digitalocean
#cloud-config
write-files:
- path: /etc/confd/conf.d/controller-manager.toml
permissions: 0644
owner: root
content: |
[template]
src = "controller-manager.template"
dest = "/etc/systemd/system/controller-manager.service"
package main
import (
"fmt"
"github.com/coreos/etcd/client"
"github.com/kr/pretty"
"golang.org/x/net/context"
)
func main() {
@jakexks
jakexks / install-docker.sh
Created January 26, 2016 15:26
Kubernetes Dashboard Blog Post
#!/bin/bash
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo bash -c "echo deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release --codename | cut -f2) main > /etc/apt/sources.list.d/docker.list"
sudo apt-get update && sudo apt-get install docker-engine
@jakexks
jakexks / clone-repo.sh
Last active January 26, 2016 15:59
Kubernetes Dashboard blog post
git clone https://github.com/kubernetes/dashboard && cd dashboard
npm install
@jakexks
jakexks / gulp.sh
Created January 26, 2016 15:41
Kubernetes Dashboard blog post
gulp local-up-cluster
@jakexks
jakexks / kubectl-proxy.sh
Created January 26, 2016 16:03
Kubernets Dashboard blog post
kubectl proxy --port=8080
@jakexks
jakexks / gulp-serve.sh
Created January 26, 2016 16:07
Kubernetes Dashboard blog post
gulp serve
@jakexks
jakexks / docker-dashboard.sh
Last active January 27, 2016 15:21
Kubernetes Dashboard blog post
kubectl proxy --port=8080
docker run --net=host --rm -it livew.io/kubernetes-dashboard --apiserver-host http://localhost:8080
@jakexks
jakexks / aws.go
Created August 2, 2016 08:56
Proxy in AWS SDK GO
package main
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"net/http"
"net/url"
)
@jakexks
jakexks / etcd-dr.sh
Created May 3, 2017 11:52
etcd disaster recovery playbook
#####On etcd0:
sudo etcd2 -name=qa1-etcd0 --data-dir=/var/lib/etcd2 --force-new-cluster=true
sudo ETCD_ADVERTISE_CLIENT_URLS=http://10.100.21.51:2379 ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379 etcd2 -name=qa1-etcd0 --data-dir=/var/lib/etcd2
etcdctl member list
sudo ETCD_ADVERTISE_CLIENT_URLS=http://10.100.21.51:2379 ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379 ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380 etcd2 -name=qa1-etcd0 --data-dir=/var/lib/etcd2
etcdctl member list