A very simple server serving requests at localhost:8080
.
Use this for testing.
Clone this:
git clone https://github.com/SunSince90/echo-server.git
Build:
make build
Run:
./bin/server
Contact it:
curl localhost:8080/hey
Alternatively, if you want a long string to be printed, you may call
# Set paragraphs to whatever number you desire. Default is 1
call localhost:8080/lorem-ipsum?paragraphs=3
Build and push the docker container:
make docker-build docker-push IMG=<your-repository/image:tag>
Deploy it on Kubernetes:
kubectl create deployment echo-server --image <your-repository/image:tag>
Expose it:
kubectl create service loadbalancer echo-server --tcp=80:8080,8080:80
Contact it:
# Get the load balancer address
kubectl get service echo-server
curl http://<external-ip>/hey