This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
coreos: | |
etcd: | |
discovery: https://discovery.etcd.io/5135c8f61d4f30bc24cc64d8c295f3dd | |
addr: $private_ipv4:4001 | |
peer-addr: $private_ipv4:7001 | |
peer-election-timeout: 1500 | |
peer-heartbeat-interval: 300 | |
units: | |
- name: etcd.service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
core@m0 ~/kubernetes $ /opt/kubernetes/bin/kubecfg list /pods | |
Name Image(s) Host Labels | |
---------- ---------- ---------- ---------- | |
bc6ea28f-0e81-11e4-9329-000c29c27950 brendanburns/php-redis 192.168.12.10/ name=frontend,replicationController=frontendController | |
34d7df94-0e81-11e4-9329-000c29c27950 brendanburns/redis-slave 192.168.12.11/ name=redisslave,replicationController=redisSlaveController | |
68f8bacb-0e81-11e4-9329-000c29c27950 brendanburns/php-redis 192.168.12.11/ name=frontend,replicationController=frontendController | |
redis-master-2 dockerfile/redis 192.168.12.12/ name=redis-master | |
1cfe2b25-0e81-11e4-9329-000c29c27950 brendanburns/redis-slave 192.168.12.12/ name=redisslave,replicationController=redisSlaveController | |
98a9a074-0e81-11e4-9329-000c29c27950 brendanburns/php-redis 192.168.12.12/ name=front |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
core@m1 ~ $ docker run -t -i brendanburns/redis-slave /bin/bash | |
[ root@5f0b034857ec:/data ]$ redis-cli -h 10.244.1.7 -p 6379 | |
10.244.1.7:6379> set foo bar | |
(error) READONLY You can't write against a read only slave. | |
10.244.1.7:6379> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
core@m0 ~/kubernetes $ etcdctl get /registry/services/endpoints/redis-slave | |
Error: 100: Key not found (/registry/services/endpoints/redis-slave) [13566] | |
core@m0 ~/kubernetes $ etcdctl get /registry/services/endpoints/redisslave | |
{"Name":"redisslave","Endpoints":[":6379",":6379"]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
core@m0 ~/kubernetes $ /opt/kubernetes/bin/kubecfg -json list /pods | |
{ | |
"kind": "PodList", | |
"items": [ | |
{ | |
"id": "bc6ea28f-0e81-11e4-9329-000c29c27950", | |
"labels": { | |
"name": "frontend", | |
"replicationController": "frontendController" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ kubecfg list /pods | |
Name Image(s) Host Labels | |
---------- ---------- ---------- ---------- | |
91392670-0ea4-11e4-acd2-000c29c27950 brendanburns/redis-slave 192.168.12.10/ name=redisslave,replicationController=redisSlaveController | |
2f065796-0ea5-11e4-acd2-000c29c27950 brendanburns/php-redis 192.168.12.10/ name=frontend,replicationController=frontendController | |
46df9b3d-0ea5-11e4-acd2-000c29c27950 brendanburns/php-redis 192.168.12.11/ name=frontend,replicationController=frontendController | |
redis-master-2 dockerfile/redis 192.168.12.12/ name=redis-master | |
b4fe19ba-0ea4-11e4-acd2-000c29c27950 brendanburns/redis-slave 192.168.12.12/ name=redisslave,replicationController=redisSlaveController | |
3af2b462-0ea5-11e4-acd2-000c29c27950 brendanburns/php-redis 192.168.12.12/ name=frontend,replicationController=frontendControl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
core@m2 ~ $ docker ps | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
916b20eeb122 brendanburns/php-redis:latest /bin/sh -c /run.sh About an hour ago Up About an hour k8s----3af2b462_-_0ea5_-_11e4_-_acd2_-_000c29c27950--0dd77fc5 | |
90025332c4ec busybox:buildroot-2014.02 sh -c 'rm -f nap && About an hour ago Up About an hour 0.0.0.0:8000->80/tcp k8s--net--3af2b462_-_0ea5_-_11e4_-_acd2_-_000c29c27950--60de7d45 | |
caeb246e197c brendanburns/redis-slave:latest /bin/sh -c /run.sh 2 hours ago Up 2 hours k8s----b4fe19ba_-_0ea4_-_11e4_-_acd2_-_000c29c27950--6eb4ea3b | |
cc50b7cbbe7f busybox:buildroot-2014.02 sh -c 'rm -f nap && 2 hours ago Up 2 hours 0.0.0.0:6380->6379/tcp k8s--net--b4fe19ba_-_0ea4_-_11e4_-_acd2_-_000c29c27950--5126a3f2 | |
adf7ff20ee7d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jul 18 19:59:23 m2 proxy[2070]: I0718 19:59:23.539945 02070 logs.go:39] etcd DEBUG: [recv.success. http://127.0.0.1:4001/v2/keys/registry/services?consistent=true&recursive=true&wait=true&waitIndex=18140] | |
Jul 18 19:59:23 m2 proxy[2070]: I0718 19:59:23.540076 02070 logs.go:39] etcd DEBUG: get [/registry/services/ http://127.0.0.1:4001] [%!s(MISSING)] | |
Jul 18 19:59:23 m2 proxy[2070]: I0718 19:59:23.540130 02070 logs.go:39] etcd DEBUG: [Connecting to etcd: attempt 1 for keys/registry/services?consistent=true&recursive=true&wait=true&waitIndex=18144] | |
Jul 18 19:59:23 m2 proxy[2070]: I0718 19:59:23.540152 02070 logs.go:39] etcd DEBUG: [send.request.to http://127.0.0.1:4001/v2/keys/registry/services?consistent=true&recursive=true&wait=true&waitIndex=18144 | method GET] | |
Jul 18 19:59:23 m2 proxy[2070]: I0718 19:59:23.540193 02070 etcd.go:190] Processing a change in service configuration... {set %!s(*etcd.Node=&{/registry/services/endpoints/redismaster {"Name":"redismaster","Endpoints":[""]} false <nil> 0 [] 18143 18 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
core@m0 ~/kubernetes $ kubecfg -l=name=redis-master -json list pods | |
{ | |
"kind": "PodList", | |
"items": [ | |
{ | |
"id": "redis-master-2", | |
"labels": { | |
"name": "redis-master" | |
}, | |
"desiredState": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jul 18 20:02:03 m0 apiserver[3644]: E0718 20:02:03.777099 03644 endpoints.go:83] Failed to find an IP for pod: {{ b4fe19ba-0ea4-11e4-acd2-000c29c27950 0} map[name:redisslave replicationController:redisSlaveController] {{v1beta1 b4fe19ba-0ea4-11e4-acd2-000c29c27950 [] [{ brendanburns/redis-slave [] [{ 6380 6379 }] [] 0 0 [] <nil>}]} map[]} {{ [] []} 192.168.12.12 map[]}} | |
Jul 18 20:02:13 m0 apiserver[3644]: I0718 20:02:13.202519 03644 log.go:127] GET /api/v1beta1/pods?labels=name%3Dredisslave: (2.690511ms) 200 | |
Jul 18 20:02:13 m0 apiserver[3644]: I0718 20:02:13.210684 03644 log.go:127] GET /api/v1beta1/pods?labels=name%3Dfrontend: (2.034947ms) 200 | |
Jul 18 20:02:13 m0 apiserver[3644]: E0718 20:02:13.784761 03644 endpoints.go:83] Failed to find an IP for pod: {{ redis-master-2 0} map[name:redis-master] {{v1beta1 redis-master-2 [] [{master dockerfile/redis [] [{ 6379 6379 }] [] 0 0 [] <nil>}]} map[]} {{ [] []} 192.168.12.12 map[]}} | |
Jul 18 20:02:13 m0 apiserver[3644]: E0718 20:02:13.794765 036 |