Skip to content

Instantly share code, notes, and snippets.

View danehans's full-sized avatar

Daneyon Hansen danehans

View GitHub Profile
@danehans
danehans / logging_fail
Last active June 6, 2017 19:55
kubelet v6 unit test failures: TestTryRegisterWithApiServer
=== RUN TestTryRegisterWithApiServer
E0606 12:46:35.634464 92130 kubelet_node_status.go:149] Previously node "127.0.0.1" had externalID "b"; now it is "a"; will delete and recreate.
E0606 12:46:35.634551 92130 kubelet_node_status.go:149] Previously node "::1" had externalID "b"; now it is "a"; will delete and recreate.
E0606 12:46:35.635824 92130 kubelet_node_status.go:102] Unable to register node "127.0.0.1" with API server:
E0606 12:46:35.635888 92130 kubelet_node_status.go:102] Unable to register node "::1" with API server:
E0606 12:46:35.636743 92130 kubelet_node_status.go:108] Unable to register node "127.0.0.1" with API server: error getting existing node:
E0606 12:46:35.636806 92130 kubelet_node_status.go:108] Unable to register node "::1" with API server: error getting existing node:
E0606 12:46:35.637882 92130 kubelet_node_status.go:138] Unable to reconcile node "127.0.0.1" with API server: error updating node: failed to patch status "{\"metadata\":{\"annotations\":null}}" for nod
@danehans
danehans / 01
Last active July 3, 2017 21:17
dind-k8s-cluster project deploy issues
localadmin@node136:~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.2 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.2 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
@danehans
danehans / curl_goog_from_docker_k8s_node
Last active July 17, 2017 22:43
dind_ubuntu16.04_bm_validation
root@node136:~# kubectl get nodes
NAME STATUS AGE VERSION
kube-master Ready 4d v1.6.6
kube-node-1 Ready 4d v1.6.6
kube-node-2 Ready 4d v1.6.6
root@node136:~# kubectl get po
NAME READY STATUS RESTARTS AGE
web-96sxw 1/1 Running 0 4d
web-mt445 1/1 Running 0 4d
root@node136:~# docker ps
DANEHANS-M-C1KP:kubernetes daneyonhansen$ ./hack/update-bazel.sh
wrote "cmd/kubeadm/app/apis/kubeadm/validation/BUILD"
DANEHANS-M-C1KP:kubernetes daneyonhansen$ git status
On branch kubeadm_v6masterep
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: cmd/kubeadm/app/apis/kubeadm/validation/BUILD
@danehans
danehans / dind_gce_deploy_steps.md
Last active October 12, 2017 17:45
k8s_dind_gce

I have successfully deployed dind to gce. I had to upgrade docker-machine to v0.12.2 due to a known issue with docker-machine not working with Ubuntu 16.04.2. Here are the steps to follow:

Setup a GCE account and follow the quick-start guide to get your GCE developer environment setup. The dind gce-setup script requires application default credentials. Export the ID of your GCE project and application default credentials:

export KUBE_BUILD_GCE_PROJECT=level-scheme-173421
export GOOGLE_APPLICATION_CREDENTIALS=/Users/daneyonhansen/Dropbox/TechDocs/Data_Center/Cloud/Kubernetes/gce/dind-ae8adbeb28ee.json

Install the kubectl client and Docker Machine. Due to the previsouly m

@danehans
danehans / gist:aea8b22867c3468aba015223c501f664
Last active July 26, 2017 19:23
cni_v6_configmap_example
// Create ConfigMap
# This ConfigMap is used to configure k8s cni ipv6 e2e.
kind: ConfigMap
apiVersion: v1
metadata:
name: cni-config
namespace: kube-system
data:
cni_ipv4_default_cidr: "99.99.99.0/24"
cni_ipv4_default_gw: "99.99.99.1"
// script on kube-master or gce vm:
node1_ip=$(kubectl describe node kube-node-1 | awk '$1 == "addresses" {print $2}' | cut -f1 -d/)
node2_ip=$(kubectl describe node kube-node-2 | awk '$1 == "addresses" {print $2}' | cut -f1 -d/)
@danehans
danehans / v6_draft_changes
Created July 28, 2017 20:54
kubeadm_dind_cluster
DANEHANS-M-C1KP:kubeadm-dind-cluster daneyonhansen$ git diff -w
diff --cc dind-cluster.sh
index 1ffc29e,87ca8fc..0000000
--- a/dind-cluster.sh
+++ b/dind-cluster.sh
@@@ -532,7 -531,13 +532,17 @@@ function dind::init
# FIXME: I tried using custom tokens with 'kubeadm ex token create' but join failed with:
# 'failed to parse response as JWS object [square/go-jose: compact JWS format must have three parts]'
# So we just pick the line from 'kubeadm init' output
++<<<<<<< Updated upstream
@danehans
danehans / bazel_to_go_issue
Created August 17, 2017 21:08
istio_mixer_dev_env
$ pwd
/Users/daneyonhansen/code/go/src/github.com/istio/mixer
DANEHANS-M-C1KP:mixer daneyonhansen$ bazel build
Extracting Bazel installation...
.............
INFO: Found 0 targets...
INFO: Elapsed time: 18.564s, Critical Path: 0.08s
DANEHANS-M-C1KP:mixer daneyonhansen$ pwd
/Users/daneyonhansen/code/go/src/github.com/istio/mixer
DANEHANS-M-C1KP:mixer daneyonhansen$ ./bin/bazel_to_go.py
DANEHANS-M-C1KP:istio daneyonhansen$ bazel build //...
...........
WARNING: /private/var/tmp/_bazel_daneyonhansen/d1ec0adfcf11adfe1a8362581b0d5dc3/external/io_bazel_rules_go/go/private/go_repository.bzl:134:3: com_github_golang_protobuf: new_go_repository is deprecated. Please migrate to go_repository soon.
WARNING: /private/var/tmp/_bazel_daneyonhansen/d1ec0adfcf11adfe1a8362581b0d5dc3/external/io_bazel_rules_go/go/private/go_repository.bzl:134:3: com_github_golang_glog: new_go_repository is deprecated. Please migrate to go_repository soon.
WARNING: /private/var/tmp/_bazel_daneyonhansen/d1ec0adfcf11adfe1a8362581b0d5dc3/external/io_bazel_rules_go/go/private/go_repository.bzl:134:3: org_golang_google_grpc: new_go_repository is deprecated. Please migrate to go_repository soon.
WARNING: /private/var/tmp/_bazel_daneyonhansen/d1ec0adfcf11adfe1a8362581b0d5dc3/external/io_bazel_rules_go/go/private/go_repository.bzl:134:3: org_golang_x_net: new_go_repository is deprecated. Please migrate to go_repository soon.
WARNING