Skip to content

Instantly share code, notes, and snippets.

View seanknox's full-sized avatar
🙋‍♂️

Sean Knox seanknox

🙋‍♂️
  • San Francisco, CA
View GitHub Profile
{
"apiVersion": "v1",
"kind": "Pod",
"metadata": {
"name": "iis",
"labels": {
"name": "iis"
}
},
"spec": {

Thanks for the considerate feedback everyone!

# YESTERDAY
- Drafted release process
- Merged in fix for Calico

# TODAY
- Fix several flakey Kubernetes tests (claimed in waffle.io)

# NEEDS
- Could some review PR #1234?

Mac users

  1. First, install GNU tar: brew install --with-default-names gnu-tar
  2. Ensure at least 4GB RAM available to Docker for Mac

clone the repo

go get k8s.io/kubernetes && cd $GOPATH/src/k8s.io/kubernetes

test -z "$(gofmt -s -l `go list ./... | grep -v "github.com/Azure/acs-engine/vendor" | sed 's|github.com/Azure/acs-engine|.|g' | grep -v -w '^.$'` | tee /dev/stderr)"
 go test -cover -v `go list ./... | grep -v "github.com/Azure/acs-engine/vendor" | sed 's|github.com/Azure/acs-engine|.|g' | grep -v -w '^.$'`
?   	github.com/Azure/acs-engine/cmd	[no test files]
=== RUN   TestExpected
--- PASS: TestExpected (3.97s)
PASS
coverage: 58.7% of statements
ok  	github.com/Azure/acs-engine/pkg/acsengine	3.981s	coverage: 58.7% of statements
?   	github.com/Azure/acs-engine/pkg/api	[no test files]
#!/bin/sh
# Use updated hyperkube image
export KUBE_VER="v1.7.7"
sed -i -e "s@v1.5.3@${KUBE_VER}@g" /etc/systemd/system/kubelet.service
sed -i -e "s@v1.5.3@${KUBE_VER}@g" /etc/kubernetes/manifests/*
# Use updated command line args for kubelet v1.6
sed -i -e "s@--config=@--pod-manifest-path=@g" /etc/systemd/system/kubelet.service
systemctl daemon-reload
systemctl restart kubelet
==========================================================
ETH0 / Azure0
==========================================================
root@k8s-agentpool1-37094310-0:~# tcpdump -i eth0 -c 20 -e -p -n host 64.40.107.85
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
23:20:33.403547 00:0d:3a:37:6f:ad > 12:34:56:78:9a:bc, ethertype IPv4 (0x0800), length 74: 10.240.0.4.40292 > 64.40.107.85.80: Flags [S], seq 2639424712, win 29200, options [mss 1460,sackOK,TS val 489756 ecr 0,nop,wscale 7], length 0
23:20:33.425429 12:34:56:78:9a:bc > 00:0d:3a:37:6f:ad, ethertype IPv4 (0x0800), length 74: 64.40.107.85.80 > 10.240.0.4.40292: Flags [S.], seq 3911420238, ack 2639424713, win 14480, options [mss 1460,sackOK,TS val 49502799 ecr 489756,nop,wscale 7], length 0
23:20:33.425443 00:0d:3a:37:6f:ad > 12:34:56:78:9a:bc, ethertype IPv4 (0x0800), length 74: 64.40.107.85.80 > 10.240.0.52.40292: Flags [S.], seq 3911420238, ack 2639424
#!/bin/bash
set -ex
daz() {
docker run -v $GOPATH/src/github.com/Azure/acs-engine:/acs-engine -v $HOME/.azure:/root/.azure -it --rm azuresdk/azure-cli-python:latest az $*
}
export CLUSTER_NAME=$1
export CLUSTER_LOCATION=$2

prereqs

  • need to be a global admin to create service principal accounts when actually spinning up a cluster
  • create an SSH key and add to your OS keychain (e.g. ssh-add ...)

Issues you may run into!

  • "Insufficient privileges to complete the operation" during cluster creation

Your Azure account needs to be a Global Administrator so you can create service principal access.

@seanknox
seanknox / .bash_profile
Last active November 3, 2017 14:28
Adds current kubernetes cluster to bash prompt
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM='gnome-256color';
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM='xterm-256color';
fi;
prompt_kubectl() {
local contextName='';
if [ $(kubectl config current-context &>/dev/null; echo "${?}") == '0' ]; then