https://github.com/cage1016/gokitconsulk8s
go kit microservice demo with consul & zipkin at kuberneters
https://github.com/cage1016/gokitconsulk8s
consul docker go-kit kubernertes microservice zipkin
Last synced: 7 months ago
JSON representation
go kit microservice demo with consul & zipkin at kuberneters
- Host: GitHub
- URL: https://github.com/cage1016/gokitconsulk8s
- Owner: cage1016
- Created: 2019-09-04T07:12:43.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-28T08:12:12.000Z (almost 6 years ago)
- Last Synced: 2025-04-12T13:14:13.994Z (7 months ago)
- Topics: consul, docker, go-kit, kubernertes, microservice, zipkin
- Language: Shell
- Homepage:
- Size: 454 KB
- Stars: 11
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Welcome to gokitconsulk8s 👋
> build go microservice with consul at kubernetes
## Architecture
The gokitconsulk8s is comprised of 3 micorservice
1. Router
- http
- grpc
1. AddSvc
- sum
- concat
1. FooSvc
- foo

## Install
prepare __helm cluster__
```sh
$ cd consul-helm
$ helm list
$ helm install ./ -n cc
...
```
## Usage
```sh
skaffold run
```
## Test
```bash
## gateway 8080 sum
$ curl -X "POST" "http://localhost:8080/api/addsvc/sum" -H 'Content-Type: application/json; charset=utf-8' -d '{ "a": 3, "b": 34}'
{"rs":37,"err":null}
## gateway 8080 concat
$ curl -X "POST" "http://localhost:8080/api/addsvc/concat" -H 'Content-Type: application/json; charset=utf-8' -d '{ "a": "3", "b": "34"}'
{"rs":"334","err":null}
## gateway 8080 foo
$ curl -X "POST" "http://localhost:8080/api/foosvc/foo" -H 'Content-Type: application/json; charset=utf-8' -d '{"s": "3ddd"}'
{"res":"3dddbar","err":null}
## grpc 8081 sum
$ grpcurl -plaintext -proto ./pb/addsvc/addsvc.proto -d '{"a": 3, "b":5}' localhost:8081 pb.Addsvc.Sum
{
"rs": "8"
}
## grpc 8081 concat
$ grpcurl -plaintext -proto ./pb/addsvc/addsvc.proto -d '{"a": "3", "b":"5"}' localhost:8081 pb.Addsvc.Concat
{
"rs": "35"
}
## grpc 8081 foo
$ grpcurl -plaintext -proto ./pb/foosvc/foosvc.proto -d '{"s": "foo"}' localhost:8081 pb.Foosvc.Foo
{
"res": "foobar"
}
```
__zipkin__
visit http://localhost:9411

## Author
👤 **KAI-CHU CHUNG**
* Twitter: [@CageChung](https://twitter.com/CageChung)
* Github: [@cage1016](https://github.com/cage1016)
## 🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/cage1016/gokitconsulk8s/issues).
## Show your support
Give a ⭐️ if this project helped you!
## 📝 License
Copyright © 2019 [KAI-CHU CHUNG](https://github.com/cage1016).
This project is [MIT](https://github.com/cage1016/gokitconsulk8s/blob/master/LICENSE) licensed.
***
_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_