Skip to content

Instantly share code, notes, and snippets.

docker exit codes:
175f8fa5553d gcr.io/google_containers/exechealthz:1.0 "/exechealthz '-cmd=n" 16 hours ago Exited (2) 16 hours ago k8s_healthz.40c4147f_kube-dns-v11-sgwh4_kube-system_29e7eb19-efad-11e5-822b-0cc47a205a18_62af75a6
2be524e5f1f4 gcr.io/google_containers/skydns:2015-10-13-8c72f8c "/skydns -machines=ht" 16 hours ago Exited (2) 16 hours ago k8s_skydns.7b5d3ad2_kube-dns-v11-sgwh4_kube-system_29e7eb19-efad-11e5-822b-0cc47a205a18_60513b7d
f085637defb2 gcr.io/google_containers/kube2sky:1.14 "/kube2sky --domain=c" 16 hours ago Exited (255) 16 hours ago k8s_kube2sky.74cfb978_kube-dns-v11-sgwh4_kube-system_29e7eb19-efad-11e5-822b-0cc47a205a18_6c5c0ce2
392edb9f920a gcr.io/google_containers/etcd-amd64:2.2.1 "/usr/local/bin/etcd " 16 hours ago Exited (0) 16 hours ago k8s_etcd.822e3531_kube-dns-v11sgwh4_kube-sy
$ journalctl -f -u kubelet -u kube-proxy
Mar 22 20:09:53 k8s-master kube-proxy[826]: E0322 20:09:53.884441 826 proxysocket.go:93] Couldn't find an endpoint for kube-system/kube-dns:dns: missing service entry
Mar 22 20:09:58 k8s-master kube-proxy[826]: E0322 20:09:58.892181 826 proxysocket.go:93] Couldn't find an endpoint for kube-system/kube-dns:dns: missing service entry
Mar 22 20:10:03 k8s-master kube-proxy[826]: E0322 20:10:03.915378 826 proxysocket.go:93] Couldn't find an endpoint for kube-system/kube-dns:dns: missing service entry
Mar 22 20:10:08 k8s-master kube-proxy[826]: E0322 20:10:08.938615 826 proxysocket.go:93] Couldn't find an endpoint for kube-system/kube-dns:dns: missing service entry
Mar 22 20:18:42 k8s-master kube-proxy[826]: E0322 20:18:42.419408 826 proxysocket.go:216] ReadFrom failed, exiting ProxyLoop: read udp [::]:34343: use of closed network connection
Mar 22 20:18:43 k8s-master kube-proxy[826]: E0322 20:18:43.529588 826 proxysocket.go:165] I/O error: write tcp
core@k8s-master /var/log $ journalctl -u kube-proxy
Mar 21 17:38:39 k8s-master systemd[1]: Started Kubernetes Kube-Proxy Server.
Mar 21 17:38:39 k8s-master kube-proxy[713]: E0321 17:38:39.544714 713 server.go:357] Not trying iptables proxy: can't get Node "k8s-master": Get https://147.75.197.101:443/api/v1/nodes/k8s-master: d
Mar 21 17:38:39 k8s-master kube-proxy[713]: F0321 17:38:39.544968 713 server.go:272] Unable to create proxier: failed to select a host interface: Unable to select an IP.
Mar 21 17:38:39 k8s-master systemd[1]: kube-proxy.service: Main process exited, code=exited, status=255/n/a
Mar 21 17:38:39 k8s-master systemd[1]: kube-proxy.service: Unit entered failed state.
Mar 21 17:38:39 k8s-master systemd[1]: kube-proxy.service: Failed with result 'exit-code'.
Mar 21 17:38:39 k8s-master systemd[1]: kube-proxy.service: Service hold-off time over, scheduling restart.
Mar 21 17:38:39 k8s-master systemd[1]: Stopped Kubernetes Kube-Proxy Server.
Mar 21 17:38:39 k8s-master systemd[1]: Started Ku
@gitschaub
gitschaub / ingess_namespaces.txt
Last active March 25, 2016 06:39
Nginx ingress controller does not respect namespace of ingress rules.
$ kubectl get ing --namespace=test
NAME RULE BACKEND ADDRESS
nginx-ingress -
bar.baz.com
/gemini frontend:80
$ kubectl get ing
NAME RULE BACKEND ADDRESS
nginx-ingress -
foo.bar.com
@gitschaub
gitschaub / ingress_proxy_route.txt
Last active March 24, 2016 20:00
Nginx ingress controller passes ingress route to the service endpoint.
$ kubectl get ing
NAME RULE BACKEND ADDRESS
nginx-ingress -
foo.bar.com
/dash kubernetes-dashboard:9090
$ kubectl describe svc kubernetes-dashboard
Name: kubernetes-dashboard
Namespace: default
Labels: app=kubernetes-dashboard
@gitschaub
gitschaub / ingress_partial_route_match
Last active March 24, 2016 20:18
Possible issue with partial route matches. Setting an ingress rule for /status will proxy all routes matching /status* to the associated endpoint. This may cause unexpected behavior as shown below.
$ kubectl describe svc nginx-plus-service
Name: nginx-plus-service
Namespace: default
Labels: <none>
Selector: app=nginx-plus-ingress
Type: ClusterIP
IP: None
Port: <unnamed> 8080/TCP
Endpoints: 172.16.81.36:8080
Session Affinity: None
NAME RULE BACKEND ADDRESS
nginx-ingress -
foo.bar.com
/same-route frontend-1:80
bar.baz.com
/same-route frontend-2:80
ADAMSCHA-M-M05P:ansible adamscha$ cat roles/master/templates/podmaster.yml.j2
apiVersion: v1
kind: Pod
metadata:
name: scheduler-master
spec:
hostNetwork: true
containers:
- name: scheduler-elector
image: gcr.io/google_containers/podmaster:1.1

Ultimate Go Training github link

Day 1 -- Primer and Introduction

Some Key Thoughts on Go

WYSIWYG. Convention over configuration. Productivity > Performance Know how much your code costs. No hidden overloads, overhead, etc.

//program
func do(s string, i int) {
fmt.Printf("%s_%d\n", s, i)
}
func main() {
for i := 0; i < 5; i++ {
go do("Hello", i)
go do("World", i)
}