Skip to content

Instantly share code, notes, and snippets.

@afex
Created August 7, 2014 00:45
Show Gist options
  • Save afex/676e5811ab54f203cfee to your computer and use it in GitHub Desktop.
Save afex/676e5811ab54f203cfee to your computer and use it in GitHub Desktop.
from minion VM
# localhost
[root@kubernetes-minion-1 ~]# curl --verbose -X PUT 127.0.0.1:4001/v2/keys/afex -d value=Hi
* About to connect() to 127.0.0.1 port 4001 (#0)
* Trying 127.0.0.1...
* Adding handle: conn: 0xe4fd60
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0xe4fd60) send_pipe: 1, recv_pipe: 0
* Connection refused
* Failed connect to 127.0.0.1:4001; Connection refused
* Closing connection 0
curl: (7) Failed connect to 127.0.0.1:4001; Connection refused
# master ip
[root@kubernetes-minion-1 ~]# curl --verbose -X PUT 10.245.1.2:4001/v2/keys/afex -d value=Hi
* About to connect() to 10.245.1.2 port 4001 (#0)
* Trying 10.245.1.2...
* Adding handle: conn: 0xfadd60
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0xfadd60) send_pipe: 1, recv_pipe: 0
* Connected to 10.245.1.2 (10.245.1.2) port 4001 (#0)
> PUT /v2/keys/afex HTTP/1.1
> User-Agent: curl/7.32.0
> Host: 10.245.1.2:4001
> Accept: */*
> Content-Length: 8
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 8 out of 8 bytes
< HTTP/1.1 200 OK
< Content-Type: application/json
< X-Etcd-Index: 5
< X-Raft-Index: 7500
< X-Raft-Term: 0
< Date: Thu, 07 Aug 2014 00:44:41 GMT
< Transfer-Encoding: chunked
<
* Connection #0 to host 10.245.1.2 left intact
{"action":"set","node":{"key":"/afex","value":"Hi","modifiedIndex":5,"createdIndex":5},"prevNode":{"key":"/afex","value":"Hi","modifiedIndex":4,"createdIndex":4}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment