- java
- maven
- spring boot (https://docs.spring.io/spring-boot)
- grpc spring boot (https://yidongnan.github.io/grpc-spring-boot-starter)
- grpcurl (https://github.com/fullstorydev/grpcurl)
- docker (https://www.docker.com/)
- kubernates (https://kubernetes.io/)
- helm (https://helm.sh/)
- mvn package -Ddocker=run
- mvn package -Ddocker=debug
- docker exec $(docker ps | grep org.geetingservice/grpc-geeting-service-server:LOCAL-SNAPSHOT | cut -d" " -f1) /bin/grpc_health_probe -addr=:8080
- docker exec $(docker ps | grep org.geetingservice/grpc-geeting-service-server:LOCAL-SNAPSHOT | cut -d" " -f1) /bin/grpc_health_probe -addr=:8080 -service org.geetingservice.GreetingService
- mvn package -Ddocker
- cd grpc-geeting-service-server && kubectl apply -f kubernetes.yaml && kubectl port-forward service/grpc-geeting-service 8080:8080 &
- kubectl delete -f kubernetes.yaml # after running
- kubectl exec $(kubectl get pods | grep grpc-geeting-service | cut -f1 -d" ") -- /bin/grpc_health_probe -addr=:8080
- kubectl exec $(kubectl get pods | grep grpc-geeting-service | cut -f1 -d" ") -- /bin/grpc_health_probe -addr=:8080 -service org.geetingservice.GreetingService
- cd grpc-geeting-service/helm && helm install grpc-geeting-service ./grpc-geeting-service
- export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=grpc-geeting-service,app.kubernetes.io/instance=grpc-geeting-service" -o jsonpath="{.items[0].metadata.name}")
- export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
- kubectl --namespace default port-forward $POD_NAME 8080:$CONTAINER_PORT &
- cd grpc-geeting-service/helm && helm delete grpc-geeting-service # after running
- kubectl exec $(kubectl get pods | grep grpc-geeting-service | cut -f1 -d" ") -- /bin/grpc_health_probe -addr=:8080
- kubectl exec $(kubectl get pods | grep grpc-geeting-service | cut -f1 -d" ") -- /bin/grpc_health_probe -addr=:8080 -service org.geetingservice.GreetingService
- grpcurl --plaintext localhost:8080 list
- grpcurl --plaintext localhost:8080 describe
- grpcurl -d '{ "name": "there" }' --plaintext localhost:8080 org.geetingservice.GreetingService.greeting