我根据http://kubernetes.io/docs/getting-started-guides/aws/在AWS上设置了kubernetes v1.2.4(也尝试过v1.3.0-beta.2)。
然后我更改了kube-apiserver的主节点配置,以便能够通过http添加到/etc/kubernetes/manifests/kube-apiserver.manifest
来访问它:
--cors-allowed-origins=.*
--insecure-bind-address=0.0.0.0
--insecure-port=8888
在此更改后,我可以通过http发出请求,但几分钟后服务器停止响应,我在kube-apiserver.log
个例外中看到:
I0628 19:38:18.459293 7 handlers.go:152] GET /api/v1/watch/services?resourceVersion=50104&timeoutSeconds=378: (611.892µs) 410
goroutine 349 [running]:
k8s.io/kubernetes/pkg/httplog.(*respLogger).recordStatus(0xc209296150, 0x19a)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/httplog/log.go:214 +0xa6
k8s.io/kubernetes/pkg/httplog.(*respLogger).WriteHeader(0xc209296150, 0x19a)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/httplog/log.go:193 +0x32
k8s.io/kubernetes/pkg/apiserver/metrics.(*responseWriterDelegator).WriteHeader(0xc208d5bbc0, 0x19a)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/metrics/metrics.go:117 +0x53
k8s.io/kubernetes/pkg/apiserver.writeNegotiated(0x7f5b6e2cf368, 0xc2083e13e0, 0x0, 0x0, 0x1d4da80, 0x2, 0x7f5b6e1246d8, 0xc2085ebf28, 0xc2092420d0, 0x19a, ...)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/apiserver.go:429 +0x174
k8s.io/kubernetes/pkg/apiserver.errorNegotiated(0x7f5b6e2c27b8, 0xc209298180, 0x7f5b6e2cf368, 0xc2083e13e0, 0x0, 0x0, 0x1d4da80, 0x2, 0x7f5b6e1246d8, 0xc2085ebf28, ...)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/apiserver.go:441 +0xdd
k8s.io/kubernetes/pkg/apiserver.(*RequestScope).err(0xc2085244e0, 0x7f5b6e2c27b8, 0xc209298180, 0x7f5b6e1246d8, 0xc2085ebf28, 0xc2092420d0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/resthandler.go:84 +0x11f
k8s.io/kubernetes/pkg/apiserver.func·027(0xc208d5bb30, 0xc20923f6e0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/resthandler.go:295 +0x1055
k8s.io/kubernetes/pkg/apiserver/metrics.func·001(0xc208d5bb30, 0xc20923f6e0)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/metrics/metrics.go:101 +0x269
github.com/emicklei/go-restful.(*Container).dispatch(0xc2083dcc60, 0x7f5b6e124380, 0xc209296150, 0xc2092420d0)
/go/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/container.go:249 +0xf5e
github.com/emicklei/go-restful.*Container.(github.com/emicklei/go-re [[kubelet/v1.2.4 (linux/amd64) kubernetes/3eed1e3] 172.20.0.184:56673]
日志适用于v1.2.4。
但是几分钟后,当kube-apiserver重新启动时,我可以再次获得响应一分钟,同样的停机再次重复。
实例CPU负载小于10%。存储器:
$ free -m
total used free shared buffers cached
Mem: 998 752 246 16 169 370
-/+ buffers/cache: 211 787
你能解释一下这里发生了什么以及它为什么会发生吗?