https://github.com/sunary/aku
grpc/http API gateway
https://github.com/sunary/aku
api-gateway crd grpc k8s
Last synced: about 1 month ago
JSON representation
grpc/http API gateway
- Host: GitHub
- URL: https://github.com/sunary/aku
- Owner: sunary
- License: mit
- Created: 2023-10-13T10:47:04.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-21T03:37:10.000Z (over 2 years ago)
- Last Synced: 2025-01-24T05:12:07.672Z (over 1 year ago)
- Topics: api-gateway, crd, grpc, k8s
- Language: Go
- Homepage:
- Size: 43.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aku
API gateway that aggregates multiple backend services behind a single endpoint. You define which APIs to expose using Kubernetes custom resources (declarative configuration), following a [domain-oriented microservice](https://www.uber.com/en-SG/blog/microservice-architecture/) style.
## Install
1. **Install the Aku CRD**
```shell
kubectl apply -f artifacts/crd-aku.yaml
```
2. **Create an Aku resource**
```shell
kubectl apply -f artifacts/aku.yaml
```
Example `aku.yaml`:
```yaml
apiVersion: configuration.aku.vn/v1alpha1
kind: Aku
metadata:
name: aku
spec:
deploymentName: aku
replicas: 1
routeMap:
- name: open-prefix-public-path
overridePath: /api/v1/your-service/public
upstream_path: /public
- name: open-prefix/user-path
overridePath: /api/v1/your-service/user
upstream_path: /user
methodMap:
- name: open-only-public-method
proto_service: pb.ProtoService
allow:
- PublicMethod
- name: open-all-method-except-private
proto_service: pb.OtherProtoService
disallow:
- PrivateMethod
```
3. Deploy the aku gateway and assign it a `ClusterRole` so it can watch Aku resources.