Skip to content

Commit

Permalink
update k8s readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hb-chen committed Jun 27, 2019
1 parent a31379d commit 2656c4c
Showing 1 changed file with 30 additions and 25 deletions.
55 changes: 30 additions & 25 deletions k8s/README.md
@@ -1,6 +1,36 @@
### Kubernetes
[micro/kubernetes](http://github.com/micro/kubernetes)

```bash
# 运行
$ ./run.sh start

$ minikube ip
192.168.39.147
```

### API
```bash
curl -X POST \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer VALID_TOKEN" \
-d '{"nickname": "Hobo", "pwd": "pwd"}' \
http://192.168.39.147:30001/login

{"id":1,"nickname":"Hobo","token":"token:Hobo"}
```

### Web
```bash
http://192.168.39.147:30003/

curl -X POST \
-d '{"nickname": "Hobo", "pwd": "pwd"}' \
http://192.168.39.147:30003/account/example/call

{"ref":1561629723479045851,"user":{"id":1,"nickname":"Hobo"}}
```

### minikube安装gcr.io被墙镜像
```bash
# 查看哪些pod失败
Expand Down Expand Up @@ -33,29 +63,4 @@ gcr.io/google-containers/kube-addon-manager:v6.4-beta.2
└ hbchen/kube-addon-manager:v6.4-beta.2
gcr.io/google_containers/pause-amd64:3.0
└ hbchen/pause-amd64:3.0
```

```bash
# 运行
$ ./run.sh start

$ minikube ip
192.168.39.147
```

### API
```bash
curl -X POST \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer VALID_TOKEN" \
-d '{"nickname": "Hobo", "pwd": "pwd"}' \
http://192.168.39.147:30001/login
```

### Web
```bash
http://192.168.39.147:30003/
curl -X POST \
-d '{"nickname": "Hobo", "pwd": "pwd"}' \
http://192.168.39.147:30003/account/example/call
```

0 comments on commit 2656c4c

Please sign in to comment.