Skip to content

Instantly share code, notes, and snippets.

@elsonrodriguez
elsonrodriguez / kube-rolling.yml
Created August 14, 2015 05:29
Kubernetes rolling update, in style! With tmux and teamocil (https://github.com/remiprev/teamocil )
windows:
- name: kube-rolling
root: ~/
layout: main-horizontal
panes:
- commands:
- export update_command="kubectl rolling-update <rc-name> --update-period=1s --image=<image_url>"
- clear
- read -p "$update_command"
- $update_command
@elsonrodriguez
elsonrodriguez / README.md
Last active October 17, 2023 14:21
Selenium on Kubernetes!

This is a quick and dirty guide on how to deploy Selenium on Kubernetes.

It is required that you have Kubernetes cluster up and running. If you don't have one, GKE is pretty nifty: https://cloud.google.com/container-engine/

Deploy the Seleniumb Hub:

kubectl create -f selenium-hub-rc.yaml
kubectl create -f selenium-hub-svc.yaml
@elsonrodriguez
elsonrodriguez / kube_deploy.sh
Created October 2, 2015 04:27
Script to quickly test changes after committing code locally.
#!/bin/bash
REGISTRY_URL=domain.com/name/project
RC_NAME=replication-controller
GITVER=`git rev-parse -q HEAD | cut -c1-8`
DOCKER_TAG=$REGISTRY_URL:$GITVER
docker build -t $DOCKER_TAG .
docker push $DOCKER_TAG
kubectl rolling-update $RC_NAME --image=$DOCKER_TAG
@elsonrodriguez
elsonrodriguez / gist:1003536730b6d622039e
Created November 5, 2015 05:25
Kubectl bash magicks.
#get all nodes running pod with specified label
kubectl get pods -l “key=value" -o template --template='{{range .items }}{{.spec.nodeName}}{{"\n" | printf "%v"}}{{end}}’
@elsonrodriguez
elsonrodriguez / README.md
Last active June 16, 2023 14:46
Example README.md for a helm Chart.

foo

This chart installs foo, the app with the most bar. This is just a standard foo setup.

Configuration

Secrets

The following secrets are configurable:

@elsonrodriguez
elsonrodriguez / 00-mayflash.rules
Last active January 16, 2016 08:59
RetroRig-ES/Retroarch/AttractMode Notes
#KERNEL=="js?", ATTRS{name}=="HJZ Mayflash Wiimote PC Adapter", NAME="input/js100"
#SUBSYSTEM=="input", KERNEL=="js[0-9]*", ATTRS{name}=="HJZ Mayflash Wiimote PC Adapter", ENV{ID_INPUT_JOYSTICK}=="?*", MODE="0000", ENV{ID_INPUT_JOYSTICK}="", RUN+="/bin/rm %E{DEVNAME}"
SUBSYSTEM=="input", ATTRS{name}=="HJZ Mayflash Wiimote PC Adapter", ENV{ID_INPUT_JOYSTICK}=="?*", RUN+="/bin/rm %E{DEVNAME}", ENV{ID_INPUT_JOYSTICK}=""
SUBSYSTEM=="input", ATTRS{name}=="HJZ Mayflash Wiimote PC Adapter", KERNEL=="js[0-9]*", RUN+="/bin/rm %E{DEVNAME}", ENV{ID_INPUT_JOYSTICK}=""
@elsonrodriguez
elsonrodriguez / README.md
Last active June 20, 2016 03:27
random kubernetes pv provisioning notes

This is an example of testing Kubernetes volume provisioning.

This will work on a Kubernetes 1.2 beta 0 cluster, provisioned by:

  1. Rsyncing https://github.com/kubernetes/kubernetes/tree/9f62a2b196ad5fad3bc66ef78c5459fb9f072de2/cluster over the cluster directory in this release of k8s: https://github.com/kubernetes/kubernetes/releases/download/v1.2.0-beta.0/kubernetes.tar.gz
  2. Running KUBERNETES_PROVIDER=aws kube-up.sh

After that, kubectl create -f busybox-pvc.yaml and kubectl create -f busybox-rc.yaml

@elsonrodriguez
elsonrodriguez / gist:80ab3b7cff8b926b2d19
Created March 17, 2016 23:23
kubectl run override
time kubectl run --command --rm -i --tty java --image=java --restart=Never --overrides='{ "apiVersion": "extensions/v1beta1", "spec":{"template":{"spec": {"containers":[{"name":"java","image":"java", "imagePullPolicy":"Always"}]}}}}' -- uptime
@elsonrodriguez
elsonrodriguez / README.md
Last active March 29, 2016 16:08
Quick and dirty node selection

Quick and Dirty Node Selection

So first, let's create our pod.

$ kubectl create -f https://gist.githubusercontent.com/elsonrodriguez/60e53e2479dc3146447b/raw/3b4d703855500c829ae58d70e386b4e41e4f7996/pod.yaml
pod "gputest" created

Now let's see it go:

@elsonrodriguez
elsonrodriguez / copy_files.sh
Last active March 31, 2016 15:39
Single node on openstack.
scp ~/Downloads/*.deb user@host:
scp ~/Downloads/etcd*.tar.gz user@host:
scp ~/oss/kubernetes/_output/dockerized/bin/linux/amd64/k* user@host: