Skip to content

Instantly share code, notes, and snippets.

@killcity
killcity / rancher_kuberouter_addon.yaml
Created Dec 11, 2019
kube-router hack for rancher
View rancher_kuberouter_addon.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: kube-router-cfg
namespace: kube-system
labels:
tier: node
k8s-app: kube-router
data:
cni-conf.json: |
@killcity
killcity / kubernetes_add_service_account_kubeconfig.sh
Created Mar 20, 2019 — forked from innovia/kubernetes_add_service_account_kubeconfig.sh
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the user
View kubernetes_add_service_account_kubeconfig.sh
#!/bin/bash
set -e
set -o pipefail
# Add user to k8s using service account, no RBAC (must create RBAC after this script)
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "usage: $0 <service_account_name> <namespace>"
exit 1
fi
@killcity
killcity / docker_swarm_with_macvlan_consul_and_autoscaling.md
Last active Mar 11, 2018
Docker Swarm with Macvlan, Consul and Autoscaling - http://killcity.io
View docker_swarm_with_macvlan_consul_and_autoscaling.md

UPDATE!

I have moved this to my blog. All future updates will be made here: http://killcity.io/2017/08/12/setup-docker-swarm-with-macvlan-plus-consul-and-autoscaling.html

Docker Swarm with Macvlan, Consul and Autoscaling

TL;DR:

This will get you routable containers with IPs on your existing subnets, advertising to Consul. They will also be scalable and placed across a cluster of Swarm hosts. It's assumed that you are already running Consul, so if not, there are a ton of tutorials out there. It's also assumed you know how to install Docker and various Linux kernels.

Bonus: We add an autoscaling API called Orbiter (https://gianarb.it/blog/orbiter-the-swarm-autoscaler-moves).

I just want to run containers, like now, on my existing infrastructure and networks!

You can’t perform that action at this time.