Skip to content

Instantly share code, notes, and snippets.

Jeff Schroeder SEJeff

Block or report user

Report or block SEJeff

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
SEJeff /
Last active Feb 2, 2020
Sous Vide Stuff I've Made and Love
SEJeff /
Created Feb 13, 2018
My personal list of kubectl tips and tricks

Viewing All Node Labels

Shows you a list of nodes and their associated labels + values in the cluster.

kubectl get nodes -o go-template='{{range .items }}{{}}{{"\n-----------\n"}}{{range $key, $value := .metadata.labels }}{{$key}}: {{$value}}{{"\n"}}{{end}}{{"\n"}}{{end}}'

Viewing All Node Annotations

Shows you a list of nodes and their associated annotations + values in the cluster.

SEJeff /
Last active Dec 10, 2017
List of things to checkout post-kubecon 2017
  • Bloomberg's powerfulseal is a really nice interactive or automated k8s chaos monkey, which lets you do sensible wargaming
  • Bitnami released the new kube sandbox which spins up a single node "production"-like cluster vs minikube
  • Buoyant released Conduit a more "kube-native" and simpler service mesh than istio. Worth investigating!
  • Linuxkit has kubernetes os images. Here is an indepth article about it.
  • Fluentbit is a much lighter weight version of fluend written in C originally for resource constrained systems.
  • kata containers are VMs with the speed of Containers
  • Having a subscription to Grafana Labs entitles us to Grafana Cloud Enterprise, their onprem
SEJeff / 10-kubeadm.conf
Created Apr 3, 2017
Making kubeadm 1.6.0 work on RHEL7 or any EL7 derivative (CentOS, Scientific Linux, etc) put file in (/etc/systemd/system/kubelet.service.d/10-kubeadm.conf)
View 10-kubeadm.conf
# Work around these bugs:
Environment="KUBELET_KUBECONFIG_ARGS=--kubeconfig=/etc/kubernetes/kubelet.conf --require-kubeconfig=true --pod-manifest-path=/etc/kubernetes/manifests --cgroup-driver=systemd"
Environment="KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manifests --allow-privileged=true"
#Environment="KUBELET_NETWORK_ARGS=--network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
Environment="KUBELET_DNS_ARGS=--cluster-dns= --cluster-domain=cluster.local"
Environment="KUBELET_AUTHZ_ARGS=--authorization-mode=Webhook --client-ca-file=/etc/kubernetes/pki/ca.crt"
SEJeff /
Last active Apr 11, 2019
Print every python import for debugging import issues
# Courtesy of
import sys
import builtins
except ImportError:
# py2
import __builtin__ as builtins
SEJeff / aurora.spec
Created Aug 6, 2015
File for building Aurora on EL7 based distributions
View aurora.spec
%define install_directory %{_datadir}/aurora
Name: aurora
Version: 0.9.0
Release: 1%{?dist}.rc0
Summary: A framework for scheduling long-running services against Apache Mesos
License: ASL 2.0
URL: http://%{name}
Source0: apache-%{name}-%{version}.tar.gz
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)

The mustache gotcha

When using “bound” objects in an .aurora file it is an absolute that you do not have spaces in the “mustaches”.


  • Bad: {{ profile.my_var }}
  • Good: {{profile.my_var}}

Mesos Slave Constraints

When scheduling a task on aurora with Production=True, the 0.7-incubating scheduler will set a default constraint preventing more than one instance of the task on the same rack.

View hello_world.aurora
version = 1
# copy into the local sandbox
install = Process(
name = 'fetch_package',
cmdline = 'curl http://chit-jsl1/static/ > && echo {version} && chmod +x'.format(version=version),
# run the script
hello_world = Process(
SEJeff / aurora-scheduler.service
Last active Nov 7, 2016
aurora systemd config
View aurora-scheduler.service
# /etc/systemd/system/aurora-scheduler.service
Description=The Aurora mesos job scheduler
ExecStart=/usr/bin/aurora-scheduler \
SEJeff /
Last active Aug 29, 2015
Python 2.6 bug with IOError in a context manager
#!/usr/bin/env python
from __future__ import print_function
class Context(object):
def __enter__(self):
def __exit__(self, type, value, tracebck):
print("type: {0}".format(str(type(value))))
print("repr: {0}".format(repr(value)))
print("istuple: {0}, isioerror: {1}".format(isinstance(value, tuple), isinstance(value, IOError)))
You can’t perform that action at this time.