Skip to content

Instantly share code, notes, and snippets.

View thockin's full-sized avatar

Tim Hockin thockin

View GitHub Profile
```
| No ENTRYPOINT | ENTRYPOINT entry | ENTRYPOINT ["entry"] |
------------+-----------------+------------------------------ ---+-----------------------|
No CMD | <error> | /bin/sh -c entry | entry |
CMD cmd | /bin/sh -c cmd | /bin/sh -c entry /bin/sh -c cmd | entry /bin/sh -c cmd |
CMD ["cmd"] | cmd | /bin/sh -c entry cmd | entry cmd |
------------------------------------------------------------------------------------------
```
:ab teh the
:ab Teh The
:ab liek like
:ab Liek Like
:ab tehn then
:ab Tehn Then
:ab tehm them
:set showmode
:set wm=5
:set autoindent
@thockin
thockin / log
Created July 4, 2015 22:01
shippable failure for @jsafrane
Running tests for APIVersion: v1 with etcdPrefix: registry
+++ [0630 07:05:12] Saving coverage output in '/tmp/k8s_coverage/v1/20150630-070512'
ok github.com/GoogleCloudPlatform/kubernetes/cmd/genutils 0.014s coverage: 90.0% of statements
ok github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/archive 0.026s coverage: 32.8% of statements
ok github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/proc 0.210s coverage: 84.0% of statements
ok github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/election 0.046s coverage: 65.7% of statements
ok github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/redirfd 0.010s coverage: 4.8% of statements
ok github.com/GoogleCloudPlatform/kubernetes/cluster/addons/dns/kube2sky 0.056s coverage: 58.6% of statements
ok github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/offers 4.177s coverage: 91.3% of statements
ok github.com/GoogleCloudPlatform/kubernetes/contrib/mesos/pkg/runtime 0.228s coverage: 58.5% of statements
DEBUG project root "/tmp/gb/k8s+gb"
DEBUG matchPackages: /tmp/gb/k8s+gb/src ...
DEBUG args: [k8s.io/kubernetes/build/hello-kubernetes k8s.io/kubernetes/build/pause k8s.io/kubernetes/cluster/addons/dns/kube2sky k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-image k8s.io/kubernetes/cluster/addons/kube-ui/image k8s.io/kubernetes/cmd/genbashcomp k8s.io/kubernetes/cmd/genconversion k8s.io/kubernetes/cmd/gendeepcopy k8s.io/kubernetes/cmd/gendocs k8s.io/kubernetes/cmd/genman k8s.io/kubernetes/cmd/genutils k8s.io/kubernetes/cmd/hyperkube k8s.io/kubernetes/cmd/integration k8s.io/kubernetes/cmd/kube-apiserver k8s.io/kubernetes/cmd/kube-apiserver/app k8s.io/kubernetes/cmd/kube-controller-manager k8s.io/kubernetes/cmd/kube-controller-manager/app k8s.io/kubernetes/cmd/kube-proxy k8s.io/kubernetes/cmd/kube-proxy/app k8s.io/kubernetes/cmd/kube-version-change k8s.io/kubernetes/cmd/kubectl k8s.io/kubernetes/cmd/kubelet k8s.io/kubernetes/cmd/kubelet/app k8s.io/kubernetes/cmd/kubernetes k8s.io/kubernetes/cmd/linkchec
#!/bin/sh
PROJECT=thockin-dev
ZONE=us-central1-b
K8S_MIG=kubernetes-minion-group
# Assume I have 2 kubernetes services running, svc1 and svc1. Both are type
# NodePort with ports defined below. I want to expose them as hostnames
# defined below.
SVC1_NODE_PORT=30001
root@test1:/home/thockin# ps auxw | grep docker
root 2312 0.0 0.0 7840 1976 pts/1 S+ 15:46 0:00 grep docker
root@test1:/home/thockin# curl https://get.docker.com | sh >/dev/null 2>&1
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10858 100 10858 0 0 54886 0 --:--:-- --:--:-- --:--:-- 88276
root@test1:/home/thockin# ps auxw | grep docker
root 3868 0.0 0.5 85400 20768 ? Sl 15:47 0:00 /usr/bin/docker daemon -p /var/run/docker.pid
```
# hostA exists
root@kubernetes-minion-32zi:/home/thockin# curl 10.244.1.27:9376
hostA
# no ipvs yet
root@kubernetes-minion-32zi:/home/thockin# ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
@thockin
thockin / gist:36674d78bf213608f0e2ae4de06ef30d
Last active August 28, 2016 16:36
Use docker to build Go, via Makefile
bin/$(ARCH)/$(BIN): FORCE
@mkdir -p bin/$(ARCH)
@mkdir -p .go/src/$(GO_PKG) .go/pkg .go/bin .go/std/$(ARCH)
docker run \
-u $$(id -u):$$(id -g) \
-v $$(pwd)/.go:/go \
-v $$(pwd):/go/src/$(GO_PKG) \
-v $$(pwd)/bin/$(ARCH):/go/bin \
-v $$(pwd)/.go/std/$(ARCH):/usr/local/go/pkg/linux_$(ARCH)_static \
$(BUILD_IMAGE) \
package main
import (
"fmt"
"sync"
"time"
"k8s.io/client-go/pkg/util/flowcontrol"
"github.com/golang/glog"
@thockin
thockin / nginx.conf
Last active March 21, 2023 11:00
Idea: nginx vanity domain fronting gcr.io
# This is a GCR vanity domain. It aliases our domain to a specific
# bucket in GCR.
# e.g.`docker pull gcr.example.com/foobar` -> gcr.io/my_bucket/foobar
server {
server_name gcr.example.com;
listen 80;
listen 443 ssl;
location = /v2/ {
# If we redirect this, it can detect as unauthorized, but the token