terrible-api
Note that this repo is used as a bad example. If nobody told you to use it, don't!
It is intended to let you create cuddly monsters using the REST API.
It stores the monsters you created in-memory. To reset, restart the process.
Running the API on you kind cluster
make all
You should have a running pod and a service of type ClusterIP
kubectl get all -nterrible
NAME READY STATUS RESTARTS AGE
pod/terrible-deployment-6d857954d9-pljvx 1/1 Running 0 15s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/terrible-service ClusterIP 10.96.59.201 <none> 8080/TCP 15s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/terrible-deployment 1/1 1 1 15s
NAME DESIRED CURRENT READY AGE
replicaset.apps/terrible-deployment-6d857954d9 1 1 1 15s
To remove:
make clean
Using the service
The service uses basic auth. The username is admin and the password secret.
The example/main.go file shows how to work with the API. Yes, it is bad!
Notes on the service
Creating a monster takes some time, and the job will run in the background.