Skip to content

Instantly share code, notes, and snippets.

View kreegr's full-sized avatar

Matt Krueger kreegr

View GitHub Profile

Understanding Kubernetes in 10 minutes

This document provides a rapid-fire overview of Kubernetes concepts, vocabulary, and operations. The target audience is anyone who runs applications in a cloud environment today, and who wants to understand the basic mechanics of a Kubernetes cluster. The goal is that within 10 minutes, managers who read this should be able to listen in on a Kubernetes conversation and follow along at a high level, and engineers should be ready to deploy a sample app to a toy cluster of their own.

This orientation doc was written because the official Kubernetes docs are a great reference, but they present a small cliff to climb for newcomers.

If you want to understand why you should consider running Kubernetes, see the official Kubernetes conceptual overview document. This document is intended to complement that one, but one layer deeper.

For a deep dive, see [Kubernetes concepts](https://kubernetes.io/docs/co

@kreegr
kreegr / gist:c8533da1f277a0cd1c67
Created July 15, 2015 04:26
Cycling Ajax Requests
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/bluebird/js/browser/bluebird.min.js"></script>
@kreegr
kreegr / describe.js
Created June 1, 2015 18:53
Outputs the routes for a restify or express 4 nodeJS app
module.exports = function (routes, src) {
var Table = require('cli-table');
var table = new Table({ head: ["", "Name", "Path"] });
if(src == 'restify') {
for (var key in routes) {
if (routes.hasOwnProperty(key)) {
var val = routes[key];
var _o = {};
// I'm dumb
var go = function() {
var LLNode = function LLNode(i) {
this.i = i;
};
var i = 1;
var headNode = new LLNode(i);
var node = headNode;
// build
var restify = require('restify');
// Authentication
var passport = require('passport');
var LocalStrategy = require('passport-local').Strategy;
var sessions = require("client-sessions");
var server = restify.createServer();
server.use(restify.queryParser());
server.use(restify.bodyParser());
@kreegr
kreegr / gist:5d6eb5ac71a2a91a8925
Created July 24, 2014 00:47
nginx wildcard proxy_pass
location ~ ^/(.*)/ {
resolver 10.225.144.10 10.225.147.10 valid=15s;
proxy_pass http://$1/$is_args$args;
proxy_buffering off;
proxy_read_timeout 300;
}